*/ use HasFactory, Notifiable; public function canAccessPanel(Panel $panel): bool { return true; } public function mobileApps(): BelongsToMany { return $this->belongsToMany(MobileApp::class)->withPivot('role')->withTimestamps(); } public function getTenants(Panel $panel): Collection { return $this->mobileApps; } public function canAccessTenant(Model $tenant): bool { return $tenant instanceof MobileApp && $this->mobileApps()->whereKey($tenant)->exists(); } /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; } }