PHP code example of wcj343169893 / yii2-lightgallery

1. Go to this page and download the library: Download wcj343169893/yii2-lightgallery 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/ */

    

wcj343169893 / yii2-lightgallery example snippets



    echo \wcj343169893\lightgallery\LightGallery::widget([
        'items' => [
            [
                'thumb' => '../thumb/image_1.jpg',
                'src' => '../big/image_1.jpg',
                'caption' => '<h4> caption </h4><p> ... </p>',
                'imgOptions' => [
                    'width' => '100%',
                    'alt' => 'description'
                ]
            ],
            [
                'thumb' => '../thumb/image_2.jpg',
                'src' => '../big/image_2.jpg'
            ]
        ],
        // more plugins: 
        'plugins' => ['lgZoom', 'lgThumbnail']
    ]);