@extends('layout.layout') @section('content') @php $availabilityDays = (int) ($filters['availability_days'] ?? 14); $activeAudience = collect($filters['audience'] ?? [])->map(fn($value) => (string) $value)->all(); $activeTime = $filters['time_preference'] ?? ''; $activeAvailability = collect($filters['availability'] ?? [])->map(fn($value) => (string) $value)->all(); $activeGender = collect($filters['gender_id'] ?? [])->map(fn($value) => (string) $value)->all(); $activeAccent = collect($filters['accent'] ?? [])->map(fn($value) => (string) $value)->all(); $activeTrack = collect($filters['track_id'] ?? [])->map(fn($value) => (string) $value)->all(); $chipUrl = function (array $changes = [], array $forget = []) { $query = request()->query(); foreach ($forget as $key) { unset($query[$key]); } foreach ($changes as $key => $value) { if ($value === null || $value === '') { unset($query[$key]); } else { $query[$key] = $value; } } return route('student.tutors.index', $query); }; $toggleUrl = function (string $key, $value) { $query = request()->query(); $values = collect((array) ($query[$key] ?? [])) ->map(fn($item) => (string) $item) ->filter() ->values(); $value = (string) $value; $values = $values->contains($value) ? $values->reject(fn($item) => $item === $value)->values() : $values->push($value)->unique()->values(); if ($values->isEmpty()) { unset($query[$key]); } else { $query[$key] = $values->all(); } return route('student.tutors.index', $query); }; $audienceLabels = [ 'Kids' => 'Kids', 'Teens' => 'Teens', 'Adults' => 'Adults', ]; @endphp
Start booking by choosing the tutor first. Pick the tutor you prefer, then choose the course and available times from their schedule.
Try changing the filters or check again after more tutor slots are added.