PHP code example of okipa / laravel-toggle-switch-button
1. Go to this page and download the library: Download okipa/laravel-toggle-switch-button 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/ */
okipa / laravel-toggle-switch-button example snippets
// laravel toggle switch button
// https://github.com/Okipa/laravel-toggle-switch-button
$this->app->register(Okipa\LaravelToggleSwitchButton\ToggleSwitchButtonServiceProvider::class);
{{ toggleSwitchButton()
->name('active')
->checked(old('active') or $model->active)
->icon('<i class="fas fa-power-off"></i>')
->label('Activation') }}
bash
php artisan vendor:publish --tag=toggle-switch-button::views