[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.
[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.