Gallery Fields

Column Type json

Lets you upload multiple images and order them.

Requirements

  • Add a JSON column to store your data
  • Add your field name to fillable on your model
  • Make your field to casts on your model:

    'gallery_orderable' => 'array',
    

Getting images on the front end.

Add the HasGalleryFields trait to your model. Then get a collection of Image files:

$my_model->getGalleryImages('my_gallery_field_name')