pimoudeveldhuis/toggle-switch-field
最新稳定版本:1.2.2
Composer 安装命令:
composer require pimoudeveldhuis/toggle-switch-field
包简介
A Toggle Switch Field for Nova 4.
README 文档
README
Toggle Switch Field for Nova 4
Features:
- Set custom color using hex color code
- Toggle or Icon align. Default (left)
- Toggle Switch in Index to update value instead of icons. Default (true)
- Toggle Switch in Detail to update value instead of icons. Default (true)
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 pimoudeveldhuis/toggle-switch-field
Usage
Table column migration
$table->boolean('toggle')->nullable()->default(true);
Add the field to Nova Resource
public function fields(NovaRequest $request)
{
return [
ToggleSwitchField::make('Toggle','toggle')
->color('#3AB95A')
->toggleAlign('center')
->indexToggle(false)
->detailToggle(false),
->formToggle(true),
];
}
Screenshots
Custom hex color code
Detail Page Toggle Switch On
Detail Page Toggle Switch Off
Detail Page Icons On
Detail Page Icons Off
Edit Page Toggle Switch On
Edit Page Toggle Switch Off
Index Page Toggle Switch
Index Page icons
Support:
Bug Tracker:
https://github.com/naifalshaye/toggle-switch-field/issues
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 88
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-06-20


















