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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -