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/ */

    

rodrigofs / filament-maskinput example snippets


MaskInput::make('money')
->money();

MaskInput::make('money')
->money(decimalPrecision: 3, allowNegative: true);

output: "-1.234,560"


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"

MaskInput::make('pattern')
->mask('99999-999')
->stripCharacters(['-'])

output: "12345-678"

MaskInput::make('pattern')
->mask('SS.SS.SSSSS.S.S.SSSSSS')
->stripCharacters(['.'])

output: "9B.GR.D08X0.4.G.117974"

MaskInput::make('pattern')
->mask('AAA-9999')
->stripCharacters(['-'])

output: "ABC-1234"
bash
php artisan vendor:publish --tag="config"