Using Spatie Media Library on Create
I'm having an issue trying to use the SpatieMediaLibraryFileUpload component on creation of a new resource entry.
It's giving me a missing model_id for the sql insert, which make sense since technically the model is not created yet, but i was wondering if there's a way to make filament create the db entry for media after my new record has been created so the association is successful.
Solution:Jump to solution
Update: I found out the issue was caused by me extending from
Illuminate\Database\Eloquent\Relations\Pivot
instead of Illuminate\Database\Eloquent\Model
1 Reply
Solution
Update: I found out the issue was caused by me extending from
Illuminate\Database\Eloquent\Relations\Pivot
instead of Illuminate\Database\Eloquent\Model