*/ protected $fillable = [ 'username', 'name', 'email', 'password', 'role', 'is_active', ]; /** * 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_active' => 'boolean', ]; public function venues(): BelongsToMany { return $this->belongsToMany(Venue::class, 'user_venue')->withTimestamps(); } public function isSuperAdmin(): bool { return $this->role === 'super_admin'; } }