2017 © Pedro Peláez
 

library laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel.

image

okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel.

  • Tuesday, July 3, 2018
  • by Okipa
  • Repository
  • 2 Watchers
  • 0 Stars
  • 465 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 13 Versions
  • 21 % Grown

The README.md

laravel-toggle-switch-button

Package abandonned in profit of https://github.com/Okipa/laravel-bootstrap-components package.

Source Code Latest Version Total Downloads License: MIT Code Coverage Scrutinizer Code Quality, (*1)

A customizable and configurable toggle switch button generator for Laravel that enables you to simply display it on your projects pages., (*2)

Laravel Toggle Switch Button, (*3)


Installation

Versions

  • V1 : composer require okipa/laravel-toggle-switch-button:^1.0.0
  • V2 : composer require okipa/laravel-toggle-switch-button:^2.0.0

For Laravel >=5.4 only

Add the package service provider in the register() method from your app/Providers/AppServiceProvider.php :, (*4)

// laravel toggle switch button
// https://github.com/Okipa/laravel-toggle-switch-button
$this->app->register(Okipa\LaravelToggleSwitchButton\ToggleSwitchButtonServiceProvider::class);

Styles import

  • Load the package SASS or CSS file from the [path/to/composer/vendor]/okipa/laravel-toggle-switch-button/styles directory to your project.

Usage

Since the toggle switch button implements the Htmlable interface, just call it this way in your blade file :, (*5)

{{ toggleSwitchButton()
    ->name('active')
    ->checked(old('active') or $model->active)
    ->icon('<i class="fas fa-power-off"></i>')
    ->label('Activation') }}

API

Public methods See the available public methods in the ToggleSwitchButton class, (*6)


Customize styles

If you use CSS, just override the package styles., (*7)

If you use SASS, you can override the following variables before the package SASS file import. Check the following example for a bootstrap use :, (*8)

// bootstrap 4 example
$toggle-switch-button-label-background-color: $input-group-addon-bg;
$toggle-switch-button-label-border-color: $input-group-addon-border-color;
$toggle-switch-button-label-font-size: $font-size-base;
$toggle-switch-button-unchecked-background-color: $input-group-addon-border-color;
$toggle-switch-button-checked-background-color: $primary;
$toggle-switch-button-label-border-radius: $btn-border-radius;
@import '[path/to/composer/vendor]/okipa/laravel-toggle-switch-button/styles/styles';

Customize templates

Publish the package blade templates file in your project :, (*9)

php artisan vendor:publish --tag=toggle-switch-button::views

Then, change the content from your resources/views/vendor/components/switch-button.blade.php file., (*10)


Contributors

The Versions

03/07 2018

dev-master

9999999-dev https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arthur Lorent

laravel php generator html switch button package generate generation toggle okipa

11/06 2018

2.0.5

2.0.5.0 https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arthur Lorent

laravel php generator html switch button package generate generation toggle okipa

11/06 2018

2.0.4

2.0.4.0 https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arthur Lorent

laravel php generator html switch button package generate generation toggle okipa

11/06 2018

2.0.3

2.0.3.0 https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arthur Lorent

laravel php generator html switch button package generate generation toggle okipa

11/06 2018

2.0.2

2.0.2.0 https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arthur Lorent

laravel php generator html switch button package generate generation toggle okipa

11/06 2018

2.0.1

2.0.1.0 https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arthur Lorent

laravel php generator html switch button package generate generation toggle okipa

03/06 2018

2.0.0

2.0.0.0 https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Arthur Lorent

laravel php generator html switch button package generate generation toggle okipa

22/05 2018

v1.x-dev

1.9999999.9999999.9999999-dev https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel that enables you to simply display it on your projects pages.

  Sources   Download

MIT

The Requires

 

by Arthur Lorent

laravel php generator html switch button package generate generation toggle okipa

21/05 2018

1.0.10

1.0.10.0 https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel that enables you to simply display it on your projects pages.

  Sources   Download

MIT

The Requires

 

by Arthur Lorent

laravel php generator html switch button package generate generation toggle okipa

16/11 2017

1.0.9

1.0.9.0 https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel that enables you to simply display it on your projects pages.

  Sources   Download

MIT

The Requires

 

by Arthur Lorent

laravel php generator html switch button generate generation toggle okipa

14/11 2017

1.0.8

1.0.8.0 https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel that enables you to simply display it on your projects pages.

  Sources   Download

MIT

The Requires

 

by Arthur Lorent

laravel php generator html switch button generate generation toggle okipa

11/11 2017

1.0.7

1.0.7.0 https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel that enables you to simply display it on your projects pages.

  Sources   Download

MIT

The Requires

 

by Arthur Lorent

php generator switch button generate toggle okipa

16/06 2017

1.0.6

1.0.6.0 https://github.com/Okipa/laravel-toggle-switch-button

A customizable toggle switch button generator for Laravel that enables you to simply display it on your projects pages.

  Sources   Download

MIT

The Requires

 

by Arthur Lorent

php generator switch button generate toggle okipa