F
Filament16mo ago
Noor

permissions

Can I access permission using artisan command ? because this is not working protected static function shouldRegisterNavigation(): bool { return auth()->user()->can('name'); } public function mount(): void { // Handle Authorization abort_unless(auth()->user()->can('name'), 403);
4 Replies
Salah Kanjo
Salah Kanjo16mo ago
shouldRegisterNavigation should be public, and you need to make sure to set authorization for user
Noor
NoorOP16mo ago
yeah how can i set that can I do it using artisan command ? @Salah Kanjo
Salah Kanjo
Salah Kanjo16mo ago
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Salah Kanjo
Salah Kanjo16mo ago
@Noor you can mark this post as solved if the above solution worked.
Want results from more Discord servers?
Add your server