PHP code example of oakcms / yii2-bootstrap-switch
1. Go to this page and download the library: Download oakcms/yii2-bootstrap-switch 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/ */
oakcms / yii2-bootstrap-switch example snippets
<?= $form->field($model, 'field')->widget(\oakcms\bootstrapswitch\Switcher::className())
<?= \oakcms\bootstrapswitch\Switcher::widget([
'name' => 'Name',
'checked' => true,
'clientOptions' => [
'size' => 'large',
'onColor' => 'success',
'offColor' => 'danger'
]
]);
php composer.phar