components([ TextInput::make('name')->required()->maxLength(255)->copyable(), TextInput::make('icon')->maxLength(255), TextInput::make('iso2')->maxLength(2), TextInput::make('iso3')->maxLength(2), TextInput::make('cc')->maxLength(2), TextInput::make('numeric')->maxLength(2), TextInput::make('txid')->maxLength(4), ]); } public static function table(Table $table): Table { return $table ->recordTitleAttribute('name') ->columns([ IconColumn::make('icon') ->sortable() ->icon(function ($state): string { return $state; })->label('Flags')->size(IconSize::TwoExtraLarge), TextColumn::make('name') ->searchable() ->copyable() ->copyMessage('Name copied') ->copyMessageDuration(1500), // TextColumn::make('iso2'), TextColumn::make('iso3'), TextColumn::make('cc'), TextColumn::make('numeric'), TextColumn::make('txid'), ]) ->defaultSort('name', direction: 'asc') ->filters([ // ]) ->recordActions([ EditAction::make(), ]); } public static function getNavigationBadge(): ?string { return parent::getEloquentQuery()->count(); } public static function getPages(): array { return [ 'index' => ManageCountries::route('/'), ]; } }