Button to create model in other resources
Hey, im looking for a way to have a Action on a resource that is a create of the expecific model i want
4 Replies
if your models are related and it's not too complicated (too many fields or complex conditions), you could do something like this:
https://filamentphp.com/docs/3.x/panels/resources/relation-managers#creating-related-records
If you want to create a different model (not related) you could create a Filament action, something like this:
if you need more data than the model, you can inject
Get
or the livewire instance.
Then in your Laravel app, create an Action
directory and create an action:
Have a look at #awcodes-quick-create for a way to read the resource outside the current resource.
i did but i wanted to have it in table header instead, is it possible with the plugin?
I mean to look at the code to see how it’s able to create actions for resources. And no the plugin itself it’s meant for tables.