PHP code example of san27079 / yii2-bootstrap-lightbox
1. Go to this page and download the library: Download san27079/yii2-bootstrap-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/ */
san27079 / yii2-bootstrap-lightbox example snippets
echo LightBoxWidget::widget([
'data' => [
['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery', 'width' => 320],
['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery', 'width' => 320],
['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery', 'width' => 320],
['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery'],
['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery'],
['src' => 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery'],
['src' => 'https://unsplash.it/1200/768.jpg?image=251', 'thumb' => 'https://unsplash.it/600.jpg?image=251', 'title' => 'Test Gallery'],
],
'options' => [
'row_class' => 'row custom_row',
'column_class' => 'col-3',
]
]);
echo LightBoxWidget::widget([
'data' => [
'src' => 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
'thumb' => 'https://unsplash.it/600.jpg?image=251',
'title' => 'Test Video',
'width' => 1280,
'height' => 720
],
'options' => [
'src_class' => 'row custom_row',
'thumb_class' => 'col-3',
]
]);
php composer.phar