marshmallow / nova-input-with-type
A Laravel Nova field.
Package info
github.com/marshmallow-packages/nova-input-with-type
pkg:composer/marshmallow/nova-input-with-type
Requires
- php: ^7.3|^8.0
This package is auto-updated.
Last update: 2026-06-11 15:52:55 UTC
README
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 your input type yourself.
🚨 Please make sure your browser supports the field types you are using!Requirements
- PHP
^7.3or^8.0 - Laravel Nova
Installation
You can install the package via Composer:
composer require marshmallow/nova-input-with-type
The field is registered automatically through Laravel's package discovery (Marshmallow\InputWithType\FieldServiceProvider); no further setup is required.
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(),
The min(), max() and step() helpers are passed straight through to the rendered input element, so they apply to any type that supports them (such as number, range, date, week and month).
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).
