*/ protected $fillable = [ 'name', 'account', 'password', 'email', 'role', 'unit', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ 'password', 'remember_token', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'password' => 'hashed', ]; protected static function booted() { static::creating(function ($user) { \Log::info('Creating user: ' . $user->id); }); static::created(function ($user) { \Log::info('User created: ' . $user->id); }); } }