Custom Action

You are missing the action

See : https://filamentphp.com/docs/3.x/actions/overview#what-is-an-action


Below in action there is a mail to be send, here you can put your query to save the data
Action::make('sendEmail')
    ->form([
        TextInput::make('subject')->required(),
        RichEditor::make('body')->required(),
    ])
    ->action(function (array $data) {
        Mail::to($this->client)
            ->send(new GenericEmail(
                subject: $data['subject'],
                body: $data['body'],
            ));
    })
Was this page helpful?