PHP code example of brussens / yii2-bootstrap-select

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

    

brussens / yii2-bootstrap-select example snippets


use brussens\bootstrap\select\Widget as Select;
echo $form->field($model, 'subject')->widget(Select::className(), [
                            'options' => ['data-live-search' => 'true'],
                            'items' => [
                                '1' => 'Item 1',
                                '2' => 'Item 2',
                                '3' => 'Item 3',
                                '4' => 'Item 4',
                                '5' => 'Item 5',
                            ]
                        ]);