nielsdscrd
nielsdscrd
FFilament
Created by nielsdscrd on 8/20/2023 in #❓┊help
Table actions on separate row - without split?
5 replies
FFilament
Created by nielsdscrd on 7/27/2023 in #❓┊help
Show a NavigationItem to admins only
I use a closure to ensure some navigation items are visible to admins only:
NavigationItem::make('Admin')
->visible(fn() => auth()->user()->hasRole('super-admin'))
->url('/admin')
->icon('gmdi-settings-o'),
NavigationItem::make('Admin')
->visible(fn() => auth()->user()->hasRole('super-admin'))
->url('/admin')
->icon('gmdi-settings-o'),
Unfortunately this makes it impossible to use
php artisan route:cache
php artisan route:cache
. What would be a better way of doing this?
11 replies
FFilament
Created by nielsdscrd on 7/3/2023 in #❓┊help
Items remain selected when filtered
In short: Items which I do not see, and may not remember to be selected, are included when I run a BulkAction. Long version: I use a table with incoming items that I filter on whether I have processed the item or not. Typically only unprocessed items are shown. Various BulkActions allow me to process items in different ways. When I select a few items and run a BulkAction, these items will disappear from the list, as they are now considered processed by the filter. When I then select a few other items, and apply a different BulkAction, the originally selected items are included too, as they are still selected, even though I don't see them anymore. IMHO this is pretty unintuitive. Is there a way to always de-select filtered items? Or to reset the selection after running a BulkAction?
7 replies