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
Table column migration
$table->boolean('toggle')->nullable()->default(true);
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
Support:
Bug Tracker:
https://github.com/naifalshaye/chatgpt-nova4/issues
License
The MIT License (MIT). Please see License File for more information.
Top comments (0)