schema([ Forms\Components\TextInput::make('code') ->required() ->maxLength(255) ->unique(ignoreRecord: true), Forms\Components\TextInput::make('name') ->required() ->maxLength(255), Forms\Components\Textarea::make('description') ->maxLength(65535) ->columnSpanFull(), Forms\Components\TextInput::make('order_index') ->numeric() ->default(0), ]); } public static function table(Table $table): Table { return $table ->columns([ Tables\Columns\TextColumn::make('code') ->badge() ->searchable(), Tables\Columns\TextColumn::make('name') ->searchable(), Tables\Columns\TextColumn::make('order_index') ->numeric() ->sortable(), Tables\Columns\TextColumn::make('created_at') ->dateTime() ->sortable() ->toggleable(isToggledHiddenByDefault: true), ]) ->defaultSort('order_index', 'asc'); } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => ListLevels::route('/'), 'create' => CreateLevel::route('/create'), 'edit' => EditLevel::route('/{record}/edit'), ]; } }