PHP code example of agungsp / filament-cleave-input
1. Go to this page and download the library: Download agungsp/filament-cleave-input 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/ */
agungsp / filament-cleave-input example snippets
use Agungsp\FilamentCleaveInput\Forms\Components\CleaveInput;
CleaveInput::make('card_number')
->creditCard()
->label('Credit Card Number');
CleaveInput::make('credit_card')
->creditCard()
use Agungsp\FilamentCleaveInput\Enums\NumeralThousandGroupStyle;
CleaveInput::make('price')
->numeral()
->numeralThousandsGroupStyle(NumeralThousandGroupStyle::THOUSAND) // or 'thousand', 'lakh', 'wan', 'none'
->numeralDecimalMark(',')
->numeralDecimalScale(2)
->numeralIntegerScale(5)
->numeralPositiveOnly()
->stripLeadingZeroes()
use Agungsp\FilamentCleaveInput\Enums\DateUnit;
CleaveInput::make('date_of_birth')
->date()
->datePattern([DateUnit::YEAR, DateUnit::MONTH, DateUnit::DAY]) // or ['Y', 'm', 'd']
->dateMin('2000-01-01')
->dateMax('2024-12-31')
use Agungsp\FilamentCleaveInput\Enums\TimeUnit;
use Agungsp\FilamentCleaveInput\Enums\TimeFormat;
CleaveInput::make('time')
->time()
->timePattern([TimeUnit::HOUR, TimeUnit::MINUTE]) // or ['h', 'm']
->timeFormat(TimeFormat::TWELVE) // or '12', '24'