laravel 4 - Mass assignment enter value in guarded field -
laravel 4 - Mass assignment enter value in guarded field -
is possible fill guarded field ::create method elequent models, if user model so:
$guarded=['password','id'] $fillable=['username']
is possible this?
user::create(['username'=>'mynewusername','password'=hash::make($password)])
no - cannot that.
but this
$user = user::create(['username'=>'mynewusername']); $user->password = hash::make($password); $user->save();
laravel-4 eloquent scoped-mass-assigment
Comments
Post a Comment