@extends('layouts.app') @section('title', 'دورات مشترك بها') @section('body_class', '') @section('content')
| اسم الدورة | حالة الاشتراك | تاريخ التسجيل | تحكم |
|---|---|---|---|
| {{ @$my_course->course->title }} |
{{$my_course->getStatusTextAttribute()}} |
{{ $my_course->created_at }} | @if($my_course->status == 5) @php $course_std = App\CourseStudent::where('course_id', $my_course->course->id)->where('status', 1)->get(); // Is Reg is avalible in this course $reg_status = 1; if($my_course->course->reg_status == '0' || $course_std->count() >= $my_course->course->seats) $reg_status = 0; // Is course is started So user cann't register $course_started = 0; if ($my_course->course->start_date < date('Y-m-d')) $course_started = 1; @endphp @if($reg_status && !$course_started) @else - @endif @else - @endif |