Replies: 2 comments
-
@freekmurze could you help me on this please |
Beta Was this translation helpful? Give feedback.
0 replies
-
I fixed the extra queries by adding model ! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I`m using the Spatie media library to upload my images like the guidance given in the documentation.
as far as I understood if I want to customize the upload path I have to create my custom path Generator file. I want each model to have their related folder name, for example, I want to have a folder named Product, and all of my products put in this folder with the name of the product in the form I set.
I created customPathGenerator. an all works fine.
now I have product, Slider, News, etc folders and everything works fine. if I add a new product, the folder with the name of the product (according to the name in my form) will be created in the Product folder and this image will be uploaded there.
This is my custom path generator file:
but my issue is the extra query in my debug bar!!!
when I use the default path generator everything is fine and there is no extra query. but if I`m using my customPathGenerator file the extra queries appear.
310μs \app\MediaLibrary\CustomPathGenerator.php:32
How can I fix this issue please let me know how can i handle this.
Regards
Beta Was this translation helpful? Give feedback.
All reactions