F
Filament11mo 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 Kanjo11mo ago
shouldRegisterNavigation should be public, and you need to make sure to set authorization for user
Noor
Noor11mo ago
yeah how can i set that can I do it using artisan command ? @Salah Kanjo
Salah Kanjo
Salah Kanjo11mo 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 Kanjo11mo ago
@Noor you can mark this post as solved if the above solution worked.
Want results from more Discord servers?
Add your server
More Posts
Disable relationmanager tabsI have 2 relation managers under my EditRecord page. How can i disable the tabs? I just want them lSelectFilter on NavBarHello, I wonder if is possible to put a SelectFilter in the top navigation bar to filter table resulafter create functionHi. How is called the fn that allows you to trigger an event after create a record?unknown error when trying to access livewire dataI do this to access the livewire property and it throughts that error. any ideas? https://flareapp.iHow could I add the options to a Select, when the options are inside the relationship in a json coluHello, how could I assign the options depending on the selected form but the options would be insideHow can I assign the options to a Select, when the options are inside a json?Hello, how could I assign the options depending on the selected form but the options would be insideSelect Component inside helper class is not updatedI have a Select Component for a Form that is inside a helper class. This Select Component is dependihow to use infoList & form, table together on a filament page?I look at the filament demo codebase but the examples there are all resource based, i like to have aViewing image after upload with FileUpload component - insecure resourceI'm using the FileUpload component in a form and it works correctly during Add (over HTTPS). I can Updated to V3 Aside flashes on route changeBasically the title I just updated to v3 but on navigation (changing the route) the aside flashes I'