schema([ Forms\Components\TextInput::make('key') ->label(__('Key')) ->required() ->maxLength(255) ->hiddenOn('edit'), Forms\Components\Fieldset::make() ->label(fn (?Setting $record) => $record ? $record->key : __('New Setting')) ->schema([ TextInput::make('value') ->label(__('Value')) ->disableLabel() ]) ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('key')->label(__('Key'))->searchable()->sortable(), Tables\Columns\TextColumn::make('value')->label(__('Value'))->searchable()->sortable(), ]) ->filters([ // ]) ->actions([ Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]) ->emptyStateActions([ Tables\Actions\CreateAction::make(), ]); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => Pages\ListSettings::route('/'), 'create' => Pages\CreateSetting::route('/create'), 'edit' => Pages\EditSetting::route('/{record}/edit'), ]; } }