New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

mixdinternet/galleries

A simple gallery package
1,071 1
Install
composer require mixdinternet/galleries
Latest Version:0.2.3
PHP:>=5.5.9
Laravel:5
License:MIT
Last Updated:Mar 25, 2018
Links: GitHub  ·  Packagist
Maintainer: agenciafmd

Galleries

A simple package of galleries to attach on a model

Installation

Add to composer.json

  "require": {
    "mixdinternet/galleries": "0.2.*"
  }

ou

  composer require mixdinternet/galleries

Service Provider

Open config/app.php then add

Mixdinternet\Galleries\Providers\GalleriesServiceProvider::class

Facades

Open config/app.php then add

'Gallery' => Mixdinternet\Galleries\Facades\Gallery::class

Publishing the files

$ php artisan vendor:publish --provider="Mixdinternet\Galleries\Providers\GalleriesServiceProvider" --tag="assets"
$ php artisan vendor:publish --provider="Mixdinternet\Galleries\Providers\GalleriesServiceProvider" --tag="config"

Running migrations

$ composer dump-autoload
$ php artisan migrate

Merge css/javascript into your gulpfile.js

...
.styles([
...
	'resources/assets/css/dropzonejs.css',
...
	],
	'public/assets/css/admin.css',
	'./')
...
.scripts([
...
	'resources/assets/js/dropzone.min.js',
	'resources/assets/js/jquery-ui.sortable.min.js',
...
    'resources/assets/js/galleries-start.js'
...
	],
    'public/assets/js/admin.js',
    './')
...    
use Mixdinternet\Galleries\GalleriableInterface;
use Mixdinternet\Galleries\GalleriableTrait;

class Post extends Model implements GalleriableInterface
{
    use GalleriableTrait;

Load the grid in your panel

{!! Gallery::form($post, [customGalleryName]) !!}

Lists all images from a model

Post::first()->galleries([customGalleryName])->images();
Post::first()->gallery->images();

Related Packages

anakadote/laravel-5-image-manager

Image resizing and cropping package for Laravel.

8,965 14
kwaadpepper/image-resizer

Resize images on the fly and cache them

8,564 5
rufhausen/placeholder

Laravel Package for using a placeholder image service to add images to your appl...

18 1
classic-o/nova-media-library

Tool and field that will let you managing files and add them to the posts

189,884 152
spatie/pixelmatch-php

Compare images using PHP

139,078 58

Version History

Version Released PHP Laravel License
0.2.3 5.3.* MIT
0.2.2 5.3.* MIT
0.2.1 5.3.* MIT
0.2.0 5.3.* MIT
0.1.12 >=5.5.9 5.1.*|5.2.*|5.3.* MIT