-
Notifications
You must be signed in to change notification settings - Fork 920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
image custom disk/folder #227
Comments
This is already an option https://laravel-backpack.readme.io/v3.0/docs/crud-fields#section-image |
Yes, but it would be nice if we add some parameters to that public function setImageAttribute($value) besides the value, so it won't be necessary to create a function for every image field |
setImageAttribute is core to laravel, it's nothing todo with backpack, it's just used as a callback when uploading an image. |
Oh, right! I didn't recognize the way its name is constructed (it's a mutator). My bad! |
i don't think that's possible. SetImageAttribute() is in the model, $crud is in the controller, no connection between them. I think a more appropriate solution to this would be a modified "upload_multiple" field. Something like "upload_multiple_images". That way you can have only one mutator. Sounds good? |
Yeah, @tabacitu, it sounds good when i don't want to use the crop feature and it's ok. Anything else might be too much work to do and it doesn't seem necessary atm. |
i am using public function setImageAttribute($value)
|
Hey fellas,
As some of you might know, i am working on some more complex page templates where i would like to add a few image fields on each template. I got their structure but i have a little problem when i start to implement. I wanna do something like a folder called uploads/pages/pagename/imagefile so i was thinking that maybe there is a way to optionally specify disk and folder when setting up the image field type so they can be read by the setImageAttribute function.
What do you think?
The text was updated successfully, but these errors were encountered: