@extends('user.layout') @section('styles') @endsection @section('content')
{{ __('Course Enrolments') }}
@if (count($enrolments) == 0)

{{ __('NO ENROLMENT FOUND!') }}

@else
@foreach ($enrolments as $enrolment) @php $course = $enrolment->course()->first(); $courseInfo = $course ->courseInformation() ->where('user_id', Auth::guard('web')->user()->id) ->where('language_id', $defaultLang->id) ->first(); $title = $courseInfo->title; $slug = $courseInfo->slug; $user = $enrolment->userInfo()->first(); @endphp @includeIf('user.course_management.enrolment.show-attachment') @endforeach
{{ __('Order ID.') }} {{ __('Course') }} {{ __('Username') }} {{ __('Paid Via') }} {{ __('Payment Status') }} {{ __('Attachment') }} {{ __('Actions') }}
{{ '#' . $enrolment->order_id }} {{ strlen($title) > 35 ? mb_substr($title, 0, 35, 'utf-8') . '...' : $title }} {{ $enrolment->customer->username }} {{ !is_null($enrolment->payment_method) ? $enrolment->payment_method : '-' }} @if ($enrolment->gateway_type == 'online' && $enrolment->payment_status != 'free') @if ($enrolment->payment_method == 'Iyzico' && $enrolment->payment_status == 'pending')

{{ __('Pending') }}

@else

{{ __('Completed') }}

@endif @elseif ($enrolment->payment_status == 'free')

{{ __('Free') }}

@elseif ($enrolment->gateway_type == 'offline')
@csrf
@else - @endif
@if (!is_null($enrolment->attachment)) {{ __('Show') }} @else - @endif
@endif
@endsection