@extends('layouts.app') @section('title', $course->title . ' - منصة ابدأ') @section('content')
@if($course->category) {{ $course->category->name }} @endif

{{ $course->title }}

@if($course->is_free) مدعوم @else {{ number_format($course->price) }} ل.س @endif

عن الكورس

{{ $course->description }}

المهارات العملية التي سيتم اكتسابها

@if($course->practicalSkills && $course->practicalSkills->count() > 0)
@foreach($course->practicalSkills as $skill)
{{ $skill->skill_name }}
@endforeach
@else

سيتم إضافة المهارات العملية قريباً

@endif
@if($course->instructor)

المدرب

{{ $course->instructor->name }}

@endif
@if($course->location)

الموقع

{{ $course->location }}

@endif @if($course->start_date)

التاريخ

{{ $course->start_date->format('d/m/Y') }}

@endif @if($course->capacity)

السعة

{{ $course->capacity }} متدرب

@endif
@php $enrollment = $course->trainees() ->where('course_trainee.user_id', auth()->id()) ->first(); $isEnrolled = $enrollment && !$enrollment->pivot->is_wishlist; $isPending = $isEnrolled && $enrollment->pivot->status === 'pending'; $isFull = $course->trainees()->count() >= $course->capacity; $isExpired = $course->end_date && $course->end_date->isPast(); $isInWishlist = $enrollment && $enrollment->pivot->is_wishlist; @endphp @if(!$isEnrolled) @endif @if($isEnrolled) @if($isPending)
طلب تسجيلك قيد الانتظار
@else
أنت مسجل في هذا الكورس
@endif @elseif($isFull)
وصلت السعة القصوى للكورس
@elseif($isExpired)
انتهت مدة التسجيل في هذا الكورس
@else
@csrf
@endif
@endsection