*/ protected $fillable = [ 'name', 'surname', 'username', 'email', 'phone_number', 'available', 'availability_manual_mode', 'availability_minutes', 'chief', 'driver', 'services', 'trainings', 'banned', 'hidden', 'password', 'birthplace', 'birthplace_province', 'ssn', 'address', 'address_zip_code', 'suit_size', 'boot_size' ]; /** * 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 = [ 'email_verified_at' => 'datetime', 'last_access' => 'datetime', 'last_availability_change' => 'datetime', 'birthday' => 'datetime', 'course_date' => 'datetime' ]; /** * @return bool */ public function canImpersonate() { return $this->hasPermission("users-impersonate"); } /** * @return bool */ public function canBeImpersonated() { return !$this->hasPermission("users-impersonate"); } }