I’m using Laravel Backpack.
I have a Product model. It has photos (wow) that I upload when creating a model in the backpack admin panel.
But there is a problem! Photos are uploaded twice:
It was ‘about-us.jpg’ load test-case
Also my database entry:
It has two path definitions, for copy too
The project is built according to EAV principles and my model has a common setAttribute() method in combination with guarded = [], which allows you to flexibly customize product attributes (they are all different). I mean, the ‘img_path’ field is also set using this method. I used dd() to see how many times Backpack enters this method. The result is as follows:
Here is result
Thank you all in advance!
I tried to create my own Uploader, tried to make restrictions in the model. The expected result is that the image is saved once