Require Login/Register to Execute Action

I have a public page (Livewire component) with a Filament form:

class CreateFirstBooking extends SimplePage implements HasForms
{
  use InteractsWithForms;

  public ?array $data = [];

  // ...

  public function form(Form $form): Form
  {
    // public form...
  }

  // ...

  public function submit()
  {
    // exec code after the user logs in or registers
  }
}


I wish to submit this form and execute some code after the user logs in or registers...

The flow would be:
  • Fill out the form
  • Click the submit button
  • Register or Login
  • Use that user recently created or logged user to execute some code
Is that possible using the Filament login/register form?
Was this page helpful?