PHP code example of gevman / yii2-owl-carousel

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

    

gevman / yii2-owl-carousel example snippets


echo \Gevman\OwlCarousel\OwlCarousel::widget([
    'elements' => [
        Html::img(null, ['class' => 'owl-lazy', 'data' => ['src' => Yii::getAlias('@web/images/image-1.jpg')]]),
        Html::img(null, ['class' => 'owl-lazy', 'data' => ['src' => Yii::getAlias('@web/images/image-2.jpg')]]),
        Html::img(null, ['class' => 'owl-lazy', 'data' => ['src' => Yii::getAlias('@web/images/image-3.jpg')]]),
    ],
    'config' => [
        'items' => 1,
        'lazyLoad' => true,
        'loop' => true,
        'dots' => true,
        'autoplay' => true,
    ]
]);