PHP Classes

Laravel Nova Toggle Field Switch: Output HTML for a Laravel Nova toggle switch field

Recommend this page to a friend!
  Info   Documentation   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 7 All time: 11,445 This week: 488Up
Version License PHP version Categories
toggle-switch-field 1.0MIT/X Consortium ...7HTML, Content management, PHP 7
Description 

Author

This package can output HTML for a Laravel Nova toggle switch field.

It registers a service provider class to use in a panel managed by Laravel Nova that defines CSS and JavaScript to generate toggle switch fields.

The package also provides a toggle switch field class that can generate the HTML to render switch fields with a given color that uses the JavaScript and CSS code supplied by the field service class.

Picture of Naif Alshaye
  Performance   Level  
Name: Naif Alshaye <contact>
Classes: 24 packages by
Country: Saudi Arabia Saudi Arabia
Age: ???
All time rank: 18576 in Saudi Arabia Saudi Arabia
Week rank: 216 Up2 in Saudi Arabia Saudi Arabia Up
Innovation award
Innovation award
Nominee: 9x

Documentation

Toggle Switch Field for Nova 4

* Toggle Switch Field for Nova 3 go to

https://github.com/naifalshaye/toggle-switch

Requirements

  • PHP 8.0 or higher
  • Nova 4

Installation

You can install the package into a Laravel app that uses Nova via composer:

composer require naif/toggle-switch-field

Usage

Add the field to Nova Resource

  public function tools()
    {
    # You can set the toggle switch color by color code.
        return [
            new ToggleSwitchField::make('toggle')->color('#3AB95A'),
        ];
    }

Screenshots

<img src="screenshots/img.png" width="150"><br> <img src="screenshots/img_1.png" width="400"><br> <img src="screenshots/img_2.png" width="400"><br> <img src="screenshots/off.png" width="100"><br> <img src="screenshots/on.png" width="100"><br> <img src="screenshots/dark-off.png" width="100"><br> <img src="screenshots/dark-on.png" width="100"><br> <img src="screenshots/index.png" width="100"><br> <img src="screenshots/dark-index.png" width="100"><br> <img src="screenshots/detail-on.png" width="100"><br> <img src="screenshots/detail-off.png" width="100"><br> <img src="screenshots/dark-detail-off.png" width="100"><br> <img src="screenshots/dark-detail-on.jpg" width="100"><br>

Support:

naif@naif.io

https://naif.io

Bug Tracker:

https://github.com/naifalshaye/chatgpt-nova4/issues

License

The MIT License (MIT). Please see License File for more information.


Screenshots (5)  
  • screenshots/dark-index.png
  • screenshots/img.png
  • screenshots/img_1.png
  • screenshots/img_2.png
  • screenshots/index.png
  Files folder image Files (30)  
File Role Description
Files folder imagedist (1 file, 2 directories)
Files folder imageresources (2 directories)
Files folder imagescreenshots (8 files)
Files folder imagesrc (2 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file nova.mix.js Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file postcss.config.js Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file webpack.mix.js Data Auxiliary data

  Files folder image Files (30)  /  dist  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (2 files)
  Accessible without login Plain text file mix-manifest.json Data Auxiliary data

  Files folder image Files (30)  /  dist  /  css  
File Role Description
  Accessible without login Plain text file field.css Data Auxiliary data

  Files folder image Files (30)  /  dist  /  js  
File Role Description
  Accessible without login Plain text file field.js Data Auxiliary data
  Accessible without login Plain text file field.js.LICENSE.txt Doc. Documentation

  Files folder image Files (30)  /  resources  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (1 file, 1 directory)

  Files folder image Files (30)  /  resources  /  css  
File Role Description
  Accessible without login Plain text file field.css Data Auxiliary data

  Files folder image Files (30)  /  resources  /  js  
File Role Description
Files folder imagecomponents (3 files)
  Accessible without login Plain text file field.js Data Auxiliary data

  Files folder image Files (30)  /  resources  /  js  /  components  
File Role Description
  Accessible without login Plain text file DetailField.vue Data Auxiliary data
  Accessible without login Plain text file FormField.vue Data Auxiliary data
  Accessible without login Plain text file IndexField.vue Data Auxiliary data

  Files folder image Files (30)  /  screenshots  
File Role Description
  Accessible without login Image file dark-detail-off.png Icon Icon image
  Accessible without login Image file dark-detail-on.jpg Icon Icon image
  Accessible without login Image file dark-off.png Icon Icon image
  Accessible without login Image file dark-on.png Icon Icon image
  Accessible without login Image file detail-off.png Icon Icon image
  Accessible without login Image file detail-on.png Icon Icon image
  Accessible without login Image file off.png Icon Icon image
  Accessible without login Image file on.png Icon Icon image

  Files folder image Files (30)  /  src  
File Role Description
  Plain text file FieldServiceProvider.php Class Class source
  Plain text file ToggleSwitchField.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:7
This week:0
All time:11,445
This week:488Up