This commit is contained in:
nurmuhammet committed 2025-10-27 20:28:48 +05:00
1 parent bf5d8f6d05
commit 4b5e2a9f94
2 files changed
+11 -6

No files matched your search

@@ -59,21 +59,22 @@ public static function form(Schema $schema): Schema
TextInput::make('number')
->label(__('Card number'))
->mask('9999 9999 9999 9999')
->columnSpan('1')
->dehydrateStateUsing(fn ($state) => str_replace(' ', '', $state))
->columnSpan(1)
->required(),
Select::make('month')
->label(__('Card month'))
->options(DateHelper::staticNumberMonths())
->native(false)
->columnSpan('1')
->columnSpan(1)
->required(),
Select::make('year')
->label(__('Card year'))
->options(DateHelper::staticNumberYears())
->native(false)
->columnSpan('1')
->columnSpan(1)
->required(),
TextInput::make('name')
@@ -90,6 +91,7 @@ public static function table(Table $table): Table
->columns([
TextColumn::make('number')
->label(__('Card number'))
->formatStateUsing(fn ($state) => trim(chunk_split($state, 4, ' ')))
->searchable(),
TextColumn::make('name')