Creating eloquent relationship model from table
Hi all!
I can't seem to figure out how I would do the following:
Lets say I have a table containing
Car
s, it nicely lists a bunch of cars with basic actions like editing and deleting (assume it's a simple resource so no dedicated pages for that - just modals). What if I'd want to add an action for example, RegisterDriverAction
, in which it would open the form for the Driver
resource, and when the user fills in the Driver
information, it creates the driver and adds it to the car, all inside the table (via a modal).
I looked into the relationship managers but they don't seem to offer any functionality like the on described above.
I also tried creating a Filament\Tables\Actions\CreateAction
and changing the record and model on that action to the Driver
class, but that doesnt' work either.
Any ideas or anything that can point me in the right direction would be greatly appreciated!
Thanks π3 Replies
Thanks for the reply! But not really what I'm looking for, clicking on the action "Register driver" on my table row should open a modal with all the fields for the driver model, upon saving it should create the driver (and ideally attach it to that rows's model as well)
Ok, then Action would do, what is not working in your case