@props(['station']) @php $colourClass = match($station['price_classification'] ?? '') { 'current' => 'text-status-good', 'recent' => 'text-slate-500', 'stale' => 'text-status-warn', 'outdated' => 'text-status-bad', default => 'text-zinc-400', }; $miles = number_format(($station['distance_km'] ?? 0) * 0.621371, 1); $price = number_format($station['price'] ?? 0, 1); @endphp
{{ $station['name'] ?? '' }}
@if (! empty($station['is_supermarket'])){{ $station['address'] ?? '' }}, {{ $station['postcode'] ?? '' }}
{{ $miles }} miles away
{{ $price }}p
{{ $station['price_classification_label'] ?? '' }} @if (! empty($station['price_updated_at'])) · {{ \Carbon\Carbon::parse($station['price_updated_at'])->diffForHumans() }} @endif