@extends('layouts.default') @push('title', get_phrase('Tutor Booking')) @push('meta')@endpush @push('css') @endpush @section('content') @php use Illuminate\Support\Str; @endphp {{ get_phrase('Home') }} {{ get_phrase('Find A Tutor') }} {{ get_phrase('Tutor Booking') }} @include('frontend.default.tutor_booking.filter') {{ get_phrase('Showing') . ' ' . count($tutors) . ' ' . get_phrase('of') . ' ' . $tutors->total() . ' ' . get_phrase('Results') }} @foreach ($tutors as $key => $tutor) @php $index = ++$key; // Get reviews for the specified tutor $reviews = App\Models\TutorReview::where('tutor_id', $tutor->id)->get(); $averageRating = $reviews->avg('rating'); $lowestPrice = App\Models\TutorCanTeach::where('instructor_id', $tutor->id)->min('price'); // if($key > 0) continue; @endphp {{ $tutor->name }} {{ number_format($averageRating, 1) }} @if ($tutor->about) {{ $tutor->about }} @endif {{ total_schedule_by_tutor_id($tutor->id) . ' ' . get_phrase('Live schedule') }} {{ total_booked_schedule_by_tutor_id($tutor->id) . ' ' . get_phrase('Booked schedule') }} {{ total_review_by_tutor_id($tutor->id) . ' ' . get_phrase('Reviews') }} {{ get_phrase('Session fee') }} {{ currency($lowestPrice) }} {{ Str::limit(strip_tags($tutor->biography), 160) }} {{ get_phrase('Book a session') }} {{ get_phrase('Send Message') }} @endforeach @if (count($tutors) > 0) {{ $tutors->links() }} @endif @endsection @push('js') @endpush
{{ get_phrase('Showing') . ' ' . count($tutors) . ' ' . get_phrase('of') . ' ' . $tutors->total() . ' ' . get_phrase('Results') }}
{{ $tutor->about }}
{{ get_phrase('Session fee') }}
{{ Str::limit(strip_tags($tutor->biography), 160) }}