@extends('site.layout') @php use App\Support\SiteFormat; $fuels = $board['fuels']; $lowest = []; foreach ($fuels as $fuel) { $lowest[$fuel['id']] = collect($board['brands'])->min(fn ($b) => $b['prices'][$fuel['id']]['price'] ?? null); } $tableFuels = collect($fuels)->take(4); $decimal = $siteLocale === 'en' ? '.' : ','; $fuelCode = $selectedFuel['code'] ?? ''; $community = $board['community']; $filterQuery = array_filter(['fuel' => $fuelCode, 'region' => $filters['region'], 'brand' => $filters['brand'], 'q' => $filters['q']]); @endphp @section('title', __('site.meta.home_title', ['in' => $countryIn])) @section('description', __('site.meta.home_description')) @push('head') @endpush @section('content')
{{-- Piyasa şeridi: yakıt başına ortalama, 30 günlük değişim, mini grafik --}} @if ($board['summary'] !== []) @endif {{-- Harita çalışma alanı --}}
@if ($mapPoints !== [])
{{ __('site.home.legend_best') }} {{ __('site.home.legend_crowd') }}
@else
{{ __('site.stations.empty') }}
@endif
{{-- Ketler ve maakonnad --}} @if ($board['brands'] !== [] || $board['regions'] !== [])
@if ($board['brands'] !== [])

{{ __('site.home.chains_today') }}

{{ __('site.home.chains_note') }}
@foreach ($tableFuels as $fuel) @endforeach @foreach ($board['brands'] as $brand) @foreach ($tableFuels as $fuel) @php $quote = $brand['prices'][$fuel['id']] ?? null; $best = $quote && $lowest[$fuel['id']] !== null && abs($quote['price'] - $lowest[$fuel['id']]) < 0.0005; @endphp @endforeach @endforeach
{{ __('site.board.brand') }}{{ __('site.fuel_short.' . $fuel['code']) }}
{{ mb_strtoupper(mb_substr($brand['name'], 0, 1)) }} {{ $brand['name'] }}{{ __('site.board.stations', ['count' => $brand['stations']]) }} {{ $quote ? SiteFormat::price($quote['price']) : '–' }}
@endif @if ($board['regions'] !== []) @php $regionFuels = collect($fuels)->whereIn('code', ['gasoline_95', 'diesel'])->values(); @endphp

{{ __('site.regions.title') }}

{{ __('site.regions.lead') }}
@foreach ($regionFuels as $fuel) @endforeach @foreach ($board['regions'] as $region) @foreach ($regionFuels as $fuel) @endforeach @endforeach
{{ __('site.station.region') }} {{ __('site.fuel_short.' . $fuel['code']) }}
{{ $region['name'] }} {{ __('site.regions.stations', ['count' => $region['stations']]) }}{{ SiteFormat::price($region['prices'][$fuel['id']] ?? null) }}
@endif
@endif {{-- Fotoğrafla bildir --}}

{{ __('site.home.photo_title') }}

{{ __('site.home.photo_lead') }}

{{ __('site.nav.report') }}
@endsection