@extends('layouts.general') @section('content') 駐輪場をお選びください。 絞込み条件を追加する 市町村名 市町村を選択してください @foreach($cities as $city) @if(isset($conditions) && $conditions[0] == $city->city_name) { {{ $city->city_name }} @else {{ $city->city_name }} @endif @endforeach 駅名 駅名を選択してください @foreach($stations as $station) @if(isset($conditions) && $conditions[1] == $station->station_neighbor_station) { {{ $station->station_neighbor_station }} @else {{ $station->station_neighbor_station }} @endif @endforeach 駐車場名 @foreach($parks as $key => $value) @if(isset($conditions) && $conditions[2] == $value) { {{ $key }} @else {{ $key }} @endif @endforeach @csrf 駐輪場名 市町村名 駅名 @foreach($psections as $psection) {{ $psection->psection_subject }} @endforeach @php $perPage = 10; $page = request()->get('page', 1); $total = count($form_data); $start = ($page - 1) * $perPage; $pagedData = array_slice($form_data, $start, $perPage); $lastPage = ceil($total / $perPage); @endphp @foreach($pagedData as $data) {{ $data['park_name'] }} {{ $data['city_name'] }} {{ $data['station_neighbor_station'] }} @foreach($psections as $psection) @foreach($data['zone_data'] as $zone) @if($zone['psection_subject'] == $psection->psection_subject) @if($zone['status'] == 1) 定期契約 @elseif($zone['status'] == 2) 空き待ち予約 @elseif($zone['status'] == 3) 販売期間外 @endif @break; @endif @endforeach @endforeach @endforeach @if($lastPage > 1) {{-- 前へ --}} «前 {{-- ページ番号 --}} @for($i = 1; $i <= $lastPage; $i++) {{ $i }} @endfor {{-- 次へ --}} »次 @endif