2 Replies
Action::make('Resit')
->icon('heroicon-o-clock')
->fillForm(function (Enrolment $enrolment) {
})
->form([
]) ->action(function (array $data, Enrolment $enrolment): void { try { Notification::make() ->title('Student Resit submitted') ->success() ->send(); } catch (Exception $exception) { Notification::make() ->title($exception->getMessage()) ->danger() ->send(); } }) how to added this form section
]) ->action(function (array $data, Enrolment $enrolment): void { try { Notification::make() ->title('Student Resit submitted') ->success() ->send(); } catch (Exception $exception) { Notification::make() ->title($exception->getMessage()) ->danger() ->send(); } }) how to added this form section
https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component
You would just use:
{{ $this->resitAction }}
to render the button.