components([ TextInput::make('group') ->required() ->maxLength(255) ->default('storefront') ->helperText('Namespace for this label, e.g. "storefront" for e-shop UI text.'), TextInput::make('key') ->required() ->maxLength(255) ->helperText('Dot-notation key, e.g. "nav.cart".'), Fieldset::make('Translations') ->schema(static::localeInputs()), ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('group') ->badge() ->sortable(), TextColumn::make('key') ->searchable() ->sortable(), ...static::localeColumns(), ]) ->filters([ SelectFilter::make('group') ->options(fn () => LanguageLine::query()->distinct()->pluck('group', 'group')), ]) ->defaultSort('key'); } public static function getRelations(): array { return []; } public static function getPages(): array { return [ 'index' => ListLanguageLines::route('/'), 'create' => CreateLanguageLine::route('/create'), 'edit' => EditLanguageLine::route('/{record}/edit'), ]; } /** * @return array