rogeecn/yii2-unslider

a wrapper of UnSlider for Yii2.x Framework

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:JavaScript

Type:yii2-extension

1.0.1 2017-12-20 03:56 UTC

This package is auto-updated.

Last update: 2024-04-05 18:07:54 UTC


README

a wrapper of UnSlider for Yii2.x Framework

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist rogeecn/yii2-unslider "~1.0.1"

or add

"rogeecn/yii2-unslider": "~1.0.1"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \rogeecn\UnSlider\Slider::widget([
    'slides' => [
        [
            'body' => 'Unslider widget for Yii2', // body will work when image field is not exist
            'url'  => "#",
        ],
        [
            'body' => $this->render("_body_view"), // you can render html instead
        ],
        [
            'image'   => '/images/cat2.jpg',
            'body'  => 'description',
        ],
    ],

]); ?>