columns([ TextColumn::make('trading_name')->searchable()->sortable(), TextColumn::make('brand_name')->searchable()->placeholder('—'), TextColumn::make('postcode')->searchable(), TextColumn::make('city'), IconColumn::make('is_supermarket')->label('Supermarket')->boolean(), IconColumn::make('is_motorway_service_station')->label('Motorway')->boolean(), IconColumn::make('temporary_closure') ->label('Temp closed') ->boolean() ->trueColor('warning') ->falseColor('success'), TextColumn::make('last_seen_at')->dateTime('d M Y H:i')->sortable(), ]) ->searchPlaceholder('Search name, brand, or postcode...') ->defaultSort('last_seen_at', 'desc') ->filters([ TernaryFilter::make('is_supermarket')->label('Supermarket'), TernaryFilter::make('is_motorway_service_station')->label('Motorway'), TernaryFilter::make('temporary_closure')->label('Temporarily closed'), TernaryFilter::make('permanent_closure')->label('Permanently closed'), ]) ->recordActions([ ViewAction::make(), ]); } public static function infolist(Schema $schema): Schema { return $schema->components([ Section::make('Location')->schema([ TextEntry::make('trading_name'), TextEntry::make('brand_name')->placeholder('—'), TextEntry::make('address_line_1'), TextEntry::make('address_line_2')->placeholder('—'), TextEntry::make('city'), TextEntry::make('county')->placeholder('—'), TextEntry::make('postcode'), TextEntry::make('country'), ])->columns(3), Section::make('Status')->schema([ TextEntry::make('is_supermarket') ->label('Supermarket') ->badge() ->formatStateUsing(fn (bool $state) => $state ? 'Yes' : 'No') ->color(fn (bool $state) => $state ? 'success' : 'gray'), TextEntry::make('is_motorway_service_station') ->label('Motorway') ->badge() ->formatStateUsing(fn (bool $state) => $state ? 'Yes' : 'No') ->color(fn (bool $state) => $state ? 'success' : 'gray'), TextEntry::make('temporary_closure') ->label('Temp Closed') ->badge() ->formatStateUsing(fn (bool $state) => $state ? 'Yes' : 'No') ->color(fn (bool $state) => $state ? 'warning' : 'success'), TextEntry::make('permanent_closure') ->label('Permanently Closed') ->badge() ->formatStateUsing(fn (bool $state) => $state ? 'Yes' : 'No') ->color(fn (bool $state) => $state ? 'danger' : 'success'), TextEntry::make('permanent_closure_date')->date()->placeholder('—'), TextEntry::make('last_seen_at')->dateTime('d M Y H:i'), ])->columns(3), Section::make('Fuel Types')->schema([ TextEntry::make('fuel_types') ->listWithLineBreaks() ->columnSpanFull(), ]), Section::make('Amenities')->schema([ TextEntry::make('amenities') ->listWithLineBreaks() ->placeholder('None recorded') ->columnSpanFull(), ]), ]); } public static function getPages(): array { return [ 'index' => ListStations::route('/'), 'view' => ViewStation::route('/{record}'), ]; } }