Pass array as parameter in Resource::getUrl
Is it possible? I need to pass the $record that has an Id and the $formulario has other Ids, they'ew connected by a pivot table since they have a many to many relationship. Just want to add that I'm a begginer in php . my code:error returned: Missing required parameters for [Route: filament.admin.resources.cargos.form] [URI: admin/cargos/{record}/mount/{formulario}] [Missing parameters: "id":4, "id":9, "id":33, "id":34].
5 Replies
this is the $formulario query:
it returns the correct ids
If needed more information I can show it
Nested relationships don’t really work natively in filament until v4. But do you need formulario in the url. Couldn’t you use the relationship on cargo to get them?
Path segments aren’t going to work with arrays either. If you need an array then it will need to be a query parameter.
I'll try it, thank you for helping