*/ protected $fillable = [ 'name', 'email', 'is_admin', 'profile_photo_path', 'password', ]; /** * 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', 'password' => 'hashed', 'is_admin' => 'boolean', ]; public function member(): HasOne { return $this->hasOne(Member::class); } public function profilePhotoUrl(): ?string { if (! $this->profile_photo_path) { return null; } return Storage::disk('public')->url($this->profile_photo_path); } }