Commit 8ce0d263 authored by Taylor Otwell's avatar Taylor Otwell

Set fillable array.

parent cb484a9d
...@@ -29,7 +29,7 @@ class Registrar implements RegistrarContract { ...@@ -29,7 +29,7 @@ class Registrar implements RegistrarContract {
*/ */
public function create(array $data) public function create(array $data)
{ {
return User::forceCreate([ return User::create([
'name' => $data['name'], 'name' => $data['name'],
'email' => $data['email'], 'email' => $data['email'],
'password' => bcrypt($data['password']), 'password' => bcrypt($data['password']),
......
...@@ -17,6 +17,13 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon ...@@ -17,6 +17,13 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
*/ */
protected $table = 'users'; 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. * The attributes excluded from the model's JSON form.
* *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment