@extends('layouts.admin.app') @section('title', 'Quản lý tuyến và điểm đón/trả') @section('content')

Quản lý tuyến và điểm đón/trả

@if (session('success'))
{{ session('success') }}
@endif @if ($errors->any())
@endif
Xóa lọc

Thêm tuyến mới

@csrf

Điểm đón *

@foreach ($stations as $station) @endforeach

Điểm trả *

@foreach ($stations as $station) @endforeach
@forelse ($items as $item) @php $pickupIds = $item->points->where('point_type', 'pickup')->pluck('station_id')->all(); $dropoffIds = $item->points->where('point_type', 'dropoff')->pluck('station_id')->all(); @endphp @empty @endforelse
Điểm đi Điểm đến Điểm đón/trả Trạng thái Tác vụ
{{ $item->code }} {{ $item->fromStation?->name }} {{ $item->toStation?->name }}
Đón: {{ $item->points->where('point_type', 'pickup')->pluck('station.name')->implode(', ') }}
Trả: {{ $item->points->where('point_type', 'dropoff')->pluck('station.name')->implode(', ') }}
{{ $item->is_active ? 'Đang dùng' : 'Tạm dừng' }}
Sửa
@csrf @method('PUT')

Điểm đón

@foreach ($stations as $station) @endforeach

Điểm trả

@foreach ($stations as $station) @endforeach
@csrf @method('DELETE')
Không có dữ liệu
{{ $items->withQueryString()->links() }}
@endsection