A Laravel Nova custom field text with masks on input
wemersonrv/input-mask is a Laravel package for a laravel nova custom field text with masks on input.
It currently has 11 GitHub stars and 98.256 downloads on Packagist (latest version v0.1.2).
Install it with composer require wemersonrv/input-mask.
Discover more Laravel packages by wemersonrv
or browse all Laravel packages to compare alternatives.
Last updated
Nova custom field text with masks.
Nova custom field text with masks. It uses vue-the-mask to implement mask directive to input field.

composer require wemersonrv/input-mask
Import it in your resources and add the InputMask to fields method.
use Wemersonrv\InputMask\InputMask;
public function fields(Request $request)
{
return [
ID::make('ID', 'id')->sortable(),
Text::make('Name', 'name'),
InputMask::make('CPF', 'cpf')
->mask('###.###.###-##') // 111.222.333.44
->raw(), // 11122233344
];
}
This custom field has only two method:
mask('###...') Implement the mask on your input field;raw() If you want to save your value without mask, just add this method.composer.json from GPLv3 to GPL-3.0-or-latercomposer.json o GPLv3Wemerson Guimarães – @WemersonCG – [email protected]
Distributed under the GPLv3 license. See LICENSE.md for more information.