$functions */ public function hasFunctions(array $functions): bool { return app(OrganizationAccess::class)->allows($this, $functions); } public function departmentScoped(): bool { return app(OrganizationAccess::class)->departmentScoped($this); } /** @use HasFactory */ use HasFactory, Notifiable; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'purchasing_role' => PurchasingRole::class, 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; } }