PHP code example of neonbug / meexo-gallery

1. Go to this page and download the library: Download neonbug/meexo-gallery 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/ */

    

neonbug / meexo-gallery example snippets


 namespace App\Packages\Shop\Providers;

class ServiceProvider extends \Neonbug\Common\Providers\BaseServiceProvider {
	
	use \Neonbug\Gallery\Traits\GalleryImagesTrait;


...
$images = App::make('\Neonbug\Gallery\Repositories\GalleryRepository')->getImages(
	'shop', // table name
	'images', // field name
	$item->id_shop, // item id
	null // language id (or null, if this field is language independent)
);

@foreach ($images as $image)
    
	$image_path = $image->getPath(
        'shop', // table name
        'images', // 
        $item->id_shop, // item id
        0 // language id (or 0, if this field is language independent)
    );
	if (!file_exists($image_path))
	{
		continue;
	}