Laravel-Backpack / community-forum

A workspace to discuss improvement and feature ideas, before they're actually implemented.
28 stars 0 forks source link

Backpack 5 for Laravel saves files into temporary folder of the webserver #540

Closed pavelkosov99 closed 1 year ago

pavelkosov99 commented 1 year ago

A mutator should have attribute name in the method name. In my case I called the mutator as setImageAttribute and my attribute name was main_picture_path so in order for everything to work flawlessly the mutator should be named as follows: setMainPicturePathAttribute. Nothing was said about it in the documentation and hours of hard work helped me to find out the solution.

promatik commented 1 year ago

Hi @pavelkosov99! This is a Laravel standard, I believe that's why this isn't in the documentation.

I'll leave this link for future reference; https://laravel.com/docs/10.x/eloquent-mutators#defining-a-mutator

Other developers may find this thread and solve their problems 🙌