Luc Van Keer
Luc Van Keer
FFilament
Created by Sorin on 4/9/2024 in #❓┊help
Where is the Filament\Actions\Concerns\CanBeHidden::authorize() method in the documentation ?
Excuses for the late answer. You can use the visible() or hidden() to conditionally show/hide the action button. In the ->action() method you can call a method on your livewire component where you can actually check the authorization. Something like: ->action(fn(array $data, Clubmember $record, EditClubmember $livewire) => $livewire->changeDepartment($record, $data)), public function changeDepartment(Clubmember $record, array $data): void { if (!filament()->auth()->user()->can('update_dept_clubmember', $record)) { return; } $record->departments = $data['departments']; $record->save(); }
10 replies
FFilament
Created by Firebat on 9/30/2024 in #❓┊help
Table Tabs in RelationManager
What was the solution (link doesn't work for me)
6 replies
FFilament
Created by ElCoco on 9/6/2023 in #❓┊help
RepeatableEntry, state array data and suffix actions. How to get the repeatable state in the action.
I think you should use a closure as parameter for suffixAction. You can inject the state there.
4 replies
FFilament
Created by phydeaux on 3/12/2024 in #❓┊help
Wizard submitAction button doesn't do validation or submission
call $this->form->getState(); in the submit method and the last step will be validated
3 replies
FFilament
Created by Muhammad Afaq on 1/30/2024 in #❓┊help
The afterValidation function is not functioning as expected in the last step of the wizard form.
Got a solution. In the submit method call $this->form->getState() which will cause the validation of the last step to trigger.
4 replies
FFilament
Created by Muhammad Afaq on 1/30/2024 in #❓┊help
The afterValidation function is not functioning as expected in the last step of the wizard form.
I have the same question/problem
4 replies
FFilament
Created by Luc Van Keer on 3/18/2024 in #❓┊help
Value object casting
Which compents can handle arrays? Do you mean repeater/builder?
6 replies
FFilament
Created by Arko on 9/27/2023 in #❓┊help
Conditionally show a dashboard page
The panel initialisation is triggered from the register method of the laravel provider. Since the user is established in the middleware pipeline, it is not available. I would solve this with a custom middleware (which can be added in the panel construction).
18 replies