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
shouldRegisterNavigation
should be public, and you need to make sure to set authorization for useryeah how can i set that can I do it using artisan command ? @Salah Kanjo
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.
@Noor you can mark this post as solved if the above solution worked.