Create single record from HasMany relationship in infolist actions
Hey,
I'm trying to figure a way to show an action to create a single record in a HasMany relationship within an infolist page with
I tried multiple things but couldn't figure how to
I have a model
Then I have a resource
Problem with infolist actions is that it registers the spatie medias to the main record, not the relation, only workaround I found is to add a repeater with all versions but I'd like to only have the "empty" new field in the add button.
Thx for any help!
I'm trying to figure a way to show an action to create a single record in a HasMany relationship within an infolist page with
SpatieMediaLibraryFileUpload fieldI tried multiple things but couldn't figure how to
I have a model
Project that has a HasMany relation on ProjectVersion, the ProjectVersion model is only there to host versioned files.Then I have a resource
ProjectResource with an infolist ViewProject. On this page I have a tab that is dedicated to project versions and I'd like to be able to have an action that can add a new one into the list.Problem with infolist actions is that it registers the spatie medias to the main record, not the relation, only workaround I found is to add a repeater with all versions but I'd like to only have the "empty" new field in the add button.
Thx for any help!