@extends('layouts.default') @push('title', get_phrase('My courses')) @push('meta')@endpush @push('css')@endpush @section('content')
@include('frontend.default.student.left_sidebar')

{{ get_phrase('My Courses') }}

@foreach ($my_courses as $course) @php $course_progress = progress_bar($course->course_id); @endphp
course-thumbnail
author-image
{{ $course->user_name }}

{{ ucfirst($course->title) }}

{{ get_phrase('Progress') }}

{{ $course_progress }}%

@php $watch_history = App\Models\Watch_history::where('course_id', $course->course_id) ->where('student_id', auth()->user()->id) ->first(); $lesson = App\Models\Lesson::where('course_id', $course->course_id) ->orderBy('sort', 'asc') ->first(); if (!$watch_history && !$lesson) { $url = route('course.player', ['slug' => $course->slug]); } else { if ($watch_history) { $lesson_id = $watch_history->watching_lesson_id; } elseif ($lesson) { $lesson_id = $lesson->id; } $url = route('course.player', ['slug' => $course->slug, 'id' => $lesson_id]); } @endphp @if ($course_progress > 0) {{ get_phrase('Continue') }} @else {{ get_phrase('Start Now') }} @endif
@endforeach @if ($my_courses->count() == 0)
@include('frontend.default.empty')
@endif
@if (count($my_courses) > 0)
@endif
@endsection @push('js') @endpush