marshmallow/nova-input-with-type

v1.0.0 2022-12-05 16:04 UTC

This package is auto-updated.

Last update: 2024-10-31 00:18:04 UTC


README

alt text

Nova Input with Type Package

Do you ever just wish you can set an input type for the Nova Field you are creating? You need a field with the time type but there is no package available for this. Wait no more! This extremely simple package lets you set you input yourself. 🚨 Please make sure your browser supports the field types you are using!

Version Issues Code Coverage Licence

Installation

You can install the package via composer:

composer require marshmallow/nova-input-with-type

Usage

You can just call the type method on your new field and nothing extra is needed:

use Marshmallow\InputWithType\InputWithType;

InputWithType::make('Started working at')->type('time'),

Methods

We’ve also created some alias methods for you if you don’t want to use the type method. Here are some examples:

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

Please see CHANGELOG for more information what has changed recently.

Testing

composer test

Security

If you discover any security related issues, please email stef@marshmallow.dev instead of using the issue tracker.

Credits

License

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