PHP code example of rodrigofs / filament-maskinput
1. Go to this page and download the library: Download rodrigofs/filament-maskinput library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
MaskInput::make('dynamic')
->mask(RawJs::make("['999.999.999-99', '99.999.999/9999-99']"))
->stripCharacters(['.','-', '/'])
->maxLength(14) // Acts as a trigger for mask switching
output: "123.456.789-01" or "12.345.678/9012-34"