schema([ // ]); } public static function table(Table $table): Table { return $table ->columns([ TextColumn::make('Highest')->label('最高价'), TextColumn::make('Million')->label('200万成交价'), TextColumn::make('created_at')->label('时间')->dateTime(), ]) ->filters([ Filter::make('created_at') ->form([ DatePicker::make('from'), DatePicker::make('until'), ]) ->query(function ($query, array $data) { return $query ->when($data['from'], fn ($q) => $q->where('created_at', '>=', $data['from'])) ->when($data['until'], fn ($q) => $q->where('created_at', '<=', $data['until'])); }), ]) ->actions([ Tables\Actions\EditAction::make(), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]) ->defaultSort('Highest', 'desc'); // ✅ 放在这里才对 } public static function getRelations(): array { return [ // ]; } public static function getPages(): array { return [ 'index' => Pages\ListUsdtC2cs::route('/'), 'create' => Pages\CreateUsdtC2c::route('/create'), 'edit' => Pages\EditUsdtC2c::route('/{record}/edit'), ]; } }