PHP code example of branchonline / yii2-unslider

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

    

branchonline / yii2-unslider example snippets


  use branchonline\unslider\Unslider;
  echo Unslider::widget([
      'options' => [
          'nav' => false,
          'keys' => true,
          'fluid' => true
       ],
       'slides' => [
            [
                'img' => 'http://unslider.com/img/sunset.jpg',
                'title' => 'Yii2 PHP Framework',
                'body' => 'Unslider widget for Yii2',
                'button' => ['title' => 'Title', 'href' => '#href', 'class' => 'btn']
            ],
            [
                'img' => 'http://unslider.com/img/subway.jpg',
                'title' => 'Another image',
                'body' => 'description',
                'button' => ['title' => 'Title', 'href' => '#href', 'class' => 'btn']
            ]
  ]]);