*/ use HasApiTokens, HasFactory, Notifiable; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'role' => UserRole::class, ]; } public function isOwner(): bool { return $this->role === UserRole::Owner; } public function zones() { return $this->hasMany(Zone::class); } }