PHP code example of smartystudio / gallerycrud

1. Go to this page and download the library: Download smartystudio/gallerycrud library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

smartystudio / gallerycrud example snippets


Cviebrock\EloquentSluggable\ServiceProvider::class,
SmartyStudio\GalleryCrud\GalleryCRUDServiceProvider::class,

'galleries' => [
    'driver' => 'local',
    'root' => storage_path('app/galleries'),
],

'roots' => [
    [
        'driver'        => 'GalleryCrudLocalFileSystem',         // driver for accessing file system (REQUIRED)
        'path'          => '../storage/app/galleries',           // path to files - relative to `public` (REQUIRED)
        'URL'           => '/galleries', // URL to files (REQUIRED)
        'accessControl' => 'Barryvdh\Elfinder\Elfinder::checkAccess',
        'autoload'      => true,
        'tmbPath'       => '',
        'tmbSize'       => 150,
        'tmbCrop'       => false,
        'tmbBgColor'    => '#000',
    ],
],

'glide_path' => 'image',
bash
$ php artisan vendor:publish --provider="SmartyStudio\GalleryCrud\GalleryCRUDServiceProvider" #publish config, view  and migration files
$ php artisan migrate #create the gallery table