Action::make('createBooking')
->label('Book')
->schema([
TextInput::make('title')
->label("Titel")
->required(),
Select::make('invoice_id')
->label('Invoice')
->relationship(name: 'invoice', titleAttribute: 'name')
])
->record(fn () => new Booking)
->action(function (array $data): void {
Booking::create($data);
}),
Action::make('createBooking')
->label('Book')
->schema([
TextInput::make('title')
->label("Titel")
->required(),
Select::make('invoice_id')
->label('Invoice')
->relationship(name: 'invoice', titleAttribute: 'name')
])
->record(fn () => new Booking)
->action(function (array $data): void {
Booking::create($data);
}),