Eugen Pașca
Resource Page navigation items with Proper Policies
Hello,
I am looking into improving the navigation on an application build with Filament. I know this was discussed before, but my flavor of issue includes the policies.
Here is my Panel provider, navigationItems part
The idea is to have in the navigation a group, in this example is called GDPR and in that group at least 2 items. for this nav group: Sign and View all.
- Problem 1: I cannot find a better way to include the CREATE page into navigation other then a custom nav item
- Problem 2: If i add the create page into the navigation and assign the isActivWhen as in example, the default ResourceList nav is active when the create is active so i need to use a custom nav item for this also
- Problem 3. Now that i use custom nav items i lost the default Policy check and have to use the visible method
Everything works as expected but i don`t feel this this is the best version. What happens when i add additional pages to that resource, have to update the isActiveWhen also.
Does anybody have a better implementation for this?
2 replies
SelectFilter search in multiple columns - Is this intended
Hello,
I am working on a resource where i am looking into filtering and i found out that a SelectFilter can't searech in multiple columns. The clasic User having
first_name
and last_name
Is this an intended functionality?
As seen bellow, i replicated that functionality using a Filter with a Select inside but it looks like too much trouble for just a simple search in multiple columns
Am i thinking of this the wrong way? Should we improve on the filter? What you thing?
5 replies
Error on the hidden method on Action (Typed property ...Component::$container)
Hello,
I am having some issues with an action that i have places inside a form:
From my tests, when i add the hidden method and add a Model property to the callback i get this error:
Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization
Any idea why? it works on other fields, only on action I get this error.
As for versions:
- PHP 8.2.11
- Laravel: 10.41.0
- Filament: 3.0.122 replies