@extends('layouts.app') @section('title', 'Tất cả khóa học') @section('content')

Tất cả khóa học

Khám phá {{ $pagination['total'] }} khóa học chất lượng cao được thiết kế dành riêng cho bạn

{{ $pagination['total'] }} Khóa học
@if($paginatedCourses->count() > 0)
{{ $paginatedCourses->count() }} khóa học @if($search) cho "{{ $search }}" @endif
@foreach($paginatedCourses as $course) @php // Detect series $series = 'Khác'; if (strpos($course->moodle_name, 'IELTS Classroom (2B)') !== false) { $series = 'IELTS Classroom (2B)'; } elseif (strpos($course->moodle_name, 'Prepare Classroom') !== false) { $series = 'Prepare Classroom'; } elseif (strpos($course->moodle_name, 'Prepare Tutoring') !== false) { $series = 'Prepare Tutoring'; } // Get short name $shortName = $course->moodle_name; if ($series === 'IELTS Classroom (2B)') { $shortName = str_replace('IELTS Classroom (2B) - ', '', $course->moodle_name); } elseif ($series === 'Prepare Classroom') { $shortName = str_replace('Prepare Classroom - ', '', $course->moodle_name); } elseif ($series === 'Prepare Tutoring') { $shortName = str_replace('Prepare Tutoring - ', '', $course->moodle_name); } // Get description $descriptions = [ 'IELTS Classroom (2B)' => 'Khóa học IELTS chuyên sâu với phương pháp giảng dạy hiện đại', 'Prepare Classroom' => 'Khóa học tiếng Anh tổng quát từ cơ bản đến nâng cao', 'Prepare Tutoring' => 'Khóa học kèm riêng 1-1 với giáo viên chuyên nghiệp', 'Khác' => 'Khóa học chuyên biệt phù hợp với nhu cầu học tập' ]; $description = $descriptions[$series] ?? 'Khóa học chất lượng cao'; // Get level $levels = [ 'Introduction' => 'Cơ bản', 'Foundation' => 'Nền tảng', 'Preparation' => 'Chuẩn bị', 'Intensive' => 'Chuyên sâu', 'Master' => 'Thành thạo', 'Beginners' => 'Người mới bắt đầu', 'Elementary' => 'Sơ cấp', 'Pre-Intermediate' => 'Tiền trung cấp', 'Intermediate' => 'Trung cấp' ]; $level = 'Tất cả cấp độ'; foreach ($levels as $key => $levelName) { if (stripos($course->moodle_name, $key) !== false) { $level = $levelName; break; } } // Get type $type = 'Khóa học'; if (strpos($course->moodle_name, 'Classroom') !== false) { $type = 'Lớp học'; } elseif (strpos($course->moodle_name, 'Tutoring') !== false) { $type = 'Kèm riêng'; } @endphp
{{ $type }}

{{ $shortName }}

{{ $level }}

{{ $description }}

@endforeach
@if($pagination['total_pages'] > 1)
@endif @else

Không tìm thấy khóa học nào

@if($search) Không có kết quả nào cho "{{ $search }}". Hãy thử từ khóa khác. @else Hiện tại chưa có khóa học nào phù hợp với bộ lọc của bạn. @endif

Xem tất cả khóa học
@endif
@endsection