* */ protected $table = 'users'; protected $fillable = [ 'name', 'email', 'password', 'foto', 'role', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'password', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'email_verified_at' => 'datetime', ]; /** * Set the user's password. * * @param string $value * @return void */ public function setPasswordAttribute($value) { $this->attributes['password'] = Hash::make($value); } }