ebess / advanced-nova-media-library

A Laravel Nova field for displaying, creating, updating and ordering a Spatie Media Library model.
591 stars 295 forks source link

Uploading failed #419

Open lamwj98 opened 11 months ago

lamwj98 commented 11 months ago

[previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'media.model_id' in 'where clause' at ...

Actions taken: I have edited the permission.php file to change it from model_id to mediable_id (which is what I have in my db).

What I want to do: I have a product resource and through this resource I want to allow user to upload images and save the images into S3 bucket. Thereafter create a Media model for each images and pass the url generated, linking Media model to the product model.

Any help will be appreciated.