PHP code example of yii-ui / yii2-rubaxa-sortable

1. Go to this page and download the library: Download yii-ui/yii2-rubaxa-sortable 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/ */

    

yii-ui / yii2-rubaxa-sortable example snippets


use yii-ui\rubaxasortable\Sortable;

echo Sortable::widget([
    'items' => [
        'Item 1',
        ['content' => 'Item2'],
        [
            'content' => 'Item3',
            'options' => ['class' => 'text-danger'],
        ],
    ],
    'containerOptions' => ['class' => 'list-group'],
    'itemOptions' => ['class' => 'list-group-item'],
    'clientOptions' => ['animation' => 0],
]);