fix: null guard on price_updated_at, consistent price formatting, use str() helper
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
<div class="mt-6">
|
||||
@if (! empty($results))
|
||||
<p class="mb-3 text-sm text-zinc-500 dark:text-zinc-400">
|
||||
{{ $meta['count'] }} {{ Str::plural('station', $meta['count']) }} found
|
||||
{{ $meta['count'] }} {{ str('station')->plural($meta['count']) }} found
|
||||
· Cheapest: {{ number_format($meta['lowest_pence'] / 100, 1) }}p
|
||||
· Average: {{ number_format($meta['avg_pence'] / 100, 1) }}p
|
||||
</p>
|
||||
@@ -87,10 +87,10 @@
|
||||
|
||||
<div class="ml-4 shrink-0 text-right">
|
||||
<p class="text-xl font-bold text-zinc-900 dark:text-zinc-100">
|
||||
{{ $station['price'] }}p
|
||||
{{ number_format($station['price'], 1) }}p
|
||||
</p>
|
||||
<p class="text-xs text-zinc-400 dark:text-zinc-500">
|
||||
{{ \Carbon\Carbon::parse($station['price_updated_at'])->diffForHumans() }}
|
||||
{{ $station['price_updated_at'] ? \Carbon\Carbon::parse($station['price_updated_at'])->diffForHumans() : 'Unknown' }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,7 +98,7 @@
|
||||
</div>
|
||||
@else
|
||||
<p class="text-sm text-zinc-500 dark:text-zinc-400">
|
||||
No stations found within {{ $radius }} {{ Str::plural('mile', $radius) }} of "{{ $search }}".
|
||||
No stations found within {{ $radius }} {{ str('mile')->plural($radius) }} of "{{ $search }}".
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user