Set fillable array.
This commit is contained in:
parent
cb484a9d47
commit
8ce0d263c1
|
@ -29,7 +29,7 @@ public function validator(array $data)
|
|||
*/
|
||||
public function create(array $data)
|
||||
{
|
||||
return User::forceCreate([
|
||||
return User::create([
|
||||
'name' => $data['name'],
|
||||
'email' => $data['email'],
|
||||
'password' => bcrypt($data['password']),
|
||||
|
|
|
@ -17,6 +17,13 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
|||
*/
|
||||
protected $table = 'users';
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = ['name', 'email', 'password'];
|
||||
|
||||
/**
|
||||
* The attributes excluded from the model's JSON form.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue