Arnaud
Explore posts from serversRepeater show field based on line number
Hello,
I would like to display a field in my repeater only if the current repeated element is not the first.
I've done this code that works well but I'm sure there is a better way to do it :
Best regards
2 replies
Add dynamic columns in table
Hello,
Not help but maybe somebody can find it when searching.
I was looking to add some columns to my table. I have a resource who has many states. The states can be created dynamically from the database and in my case the relation is MorphToMany 😅
But easy to add it to Filament :
1/ Add the getTableColumns() function
2/ Inside, push new columns to exist ones
Enjoy
2 replies
Strange behavior with sort in views
Hello,
I have for exemple a public variable $events, filled by a simple eloquent call : $this->record->events()->orderBy('events.start_at', 'desc')->get();
On controller part, the order is good, if I die and dump on view, it's good but it seems, with the page hydration, I see a glitch and my results are not in the same order.
How can I manage that ?
Best regards,
8 replies
Use Notification for error 500 in production
Hello,
With error handling, how do you manage to display a notification instead of the classical big gray screen for error 500 in production ?
I just would like to say there is an error, contact the support.
Best regards,
6 replies
Hide form loose state
I have a livewire component who own many sub components. If I do something like that :
Every time I change step, I will get many error messages in console :
Any idea how to completely hide from page a form and reshow it without problem ?
5 replies
Tenant admin color
Hello,
Do you know a way to get Tenant in Filament Provider in order to have the current Tenant ? The idea behind that is to set a color per Panel
I've tried to use the bootUsing method in $panel, but set $panel->colors no update the color ...
The problem with AppServiceProvider is I can't get current tenant or even route ...
7 replies
Filter by pivot
Hello,
I'm looking for a way to filter a table by pivot column. I'm using it inside a full Filament v3 admin panel.
For exemple, I have Users and Teams. They are linked by a pivot table with three columns :
- user_id
- team_id
- role
When I would like to update the baseQuery :
I got an error message :
Because in my select filters make method I have put 'role'.
I've tried so far :
- make('team.role')
- make('teams.pivot.role')
...
In my models, I have correctly set-up withPivot('role')
How to filter by pivot column ?
2 replies