marshmallow / nova-input-with-type
一个Laravel Nova字段。
v1.0.0
2022-12-05 16:04 UTC
Requires
- php: ^7.3|^8.0
README
Nova Input with Type 包
你是否曾希望可以为创建的Nova字段设置输入类型?你需要一个时间类型的字段,但没有可用的包。无需等待!这个极其简单的包让你可以自己设置输入。 🚨 请确保您的浏览器支持您正在使用的字段类型!
安装
您可以通过composer安装此包
composer require marshmallow/nova-input-with-type
用法
您只需在新的字段上调用type方法即可,无需额外操作
use Marshmallow\InputWithType\InputWithType; InputWithType::make('Started working at')->type('time'),
方法
我们还为您创建了一些别名方法,如果您不想使用type
方法。以下是一些示例
text()
InputWithType::make('My field')->text(),
color()
InputWithType::make('My field')->color(),
date()
InputWithType::make('My field')->date(),
datetimeLocal()
InputWithType::make('My field')->datetimeLocal(),
email()
InputWithType::make('My field')->email(),
hidden()
InputWithType::make('My field')->hidden(),
number()
InputWithType::make('My field')->number(),
password()
InputWithType::make('My field')->password(),
range()
InputWithType::make('My field') ->range() ->min(0) ->max(10) ->step(2),
tel()
InputWithType::make('My field')->tel(),
time()
InputWithType::make('My field')->time(),
url()
InputWithType::make('My field')->url(),
week()
InputWithType::make('My field') ->week() ->min('2018-W18') ->max('2018-W26'),
month()
InputWithType::make('My field') ->month() ->min('2018-03'),
search()
InputWithType::make('My field')->search(),
变更日志
请参阅CHANGELOG以获取更多最近更改的信息。
测试
composer test
安全性
如果您发现任何安全问题,请通过电子邮件stef@marshmallow.dev报告,而不是使用问题跟踪器。
鸣谢
许可证
MIT许可证(MIT)。请参阅许可证文件以获取更多信息。