PHP code example of lumenpink / yii2-lightbox

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

    

lumenpink / yii2-lightbox example snippets


use yeesoft\lightbox\Lightbox;

echo Lightbox::widget([
    'options' => [
        'fadeDuration' => '2000',
        'albumLabel' => "Image %1 of %2",
    ],
    'linkOptions' => ['class' => 'pull-left'],
    'imageOptions' => ['class' => 'thumbnail'],
    'items' => [
        [
            'thumb' => '/images/image01-120x90.jpg',
            'image' => '/images/image01.jpg',
            'title' => 'Image 1',
            'group' => 'image-set1',
        ],
        [
            'thumb' => '/images/image02-120x90.jpg',
            'image' => '/images/image02.jpg',
            'title' => 'Image 2',
            'group' => 'image-set1',
        ],
    ],
]);