Media Library #1236
Replies: 2 comments 1 reply
-
Backpack now offers first-party support for Spatie MediaLibrary, which can be used to manage galleries and choose images from previews. While I don't have a specific demo to show you, I can provide some information on how to implement this functionality:
CRUD::field('avatar')->type('image')->withMedia(); This will allow you to upload and manage images using Spatie MediaLibrary Release Notes.
$this->crud->addFields([
[
'name' => 'gallery',
'label' => 'Gallery Images',
'type' => 'browse_multiple',
'sortable' => true,
],
]); This will enable drag-and-drop reordering of selected files Pull Request #2261. While this isn't a complete demo, it should give you a starting point for implementing a user-manageable gallery with image previews using Spatie MediaLibrary and Backpack. For more detailed implementation, you may need to refer to the Spatie MediaLibrary documentation and potentially customize the Backpack fields to suit your specific needs. Relevant sources: Github Issue (closed): Check if spatie/media-library works with current Backpack fields |
Beta Was this translation helpful? Give feedback.
-
Hey @blondie63 Please help me understand why you would choose the Spatie MediaLibrary Right now, I do not see such a thing in the plan. If you are making one, you can choose to create it in a package form and share it with the Backpack community. -- |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Does anyone have a demo of a realistic implementation of Spatie MediaLibrary where a user can manage his own gallery and can choose images from previews? :)
Beta Was this translation helpful? Give feedback.
All reactions