*/ use HasFactory, Notifiable; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'email', 'password', "bio", "avatar", "status", "mood", "about_you", // interests "interests_general", "interests_music", "interests_movies", "interests_television", "interests_books", "interests_heroes" ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'password', 'remember_token', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; } protected function avatar () : Attribute { return Attribute::make (get: function ($value) { return $value ? "/storage/avatars/" . $value : "/resources/img/default.jpg"; }); } public function actor () { return $this->hasOne (Actor::class); } }