@extends('backend.layouts.app') @section('title', __('strings.backend.dashboard.title').' | '.app_name()) @push('after-styles') @endpush @section('content')
@lang('strings.backend.dashboard.welcome') {{ $logged_in_user->name }}!
@if(auth()->user()->hasRole('student')) @if(count($pending_orders) > 0)

@lang('labels.backend.dashboard.pending_orders')

@foreach($pending_orders as $key=>$item) @php $key++ @endphp @endforeach
@lang('labels.general.sr_no') @lang('labels.backend.orders.fields.reference_no') @lang('labels.backend.orders.fields.items') @lang('labels.backend.orders.fields.amount') (in {{$appCurrency['symbol']}}) @lang('labels.backend.orders.fields.payment_status.title') @lang('labels.backend.orders.fields.date')
{{$key}} {{$item->reference_no}} @foreach($item->items as $key=>$subitem) @php $key++ @endphp @if($subitem->item != null) {{$key.'. '.$subitem->item->title}}
@endif @endforeach
{{$item->amount}} @if($item->status == 0) @lang('labels.backend.dashboard.pending') @elseif($item->status == 1) @lang('labels.backend.dashboard.success') @elseif($item->status == 2) @lang('labels.backend.dashboard.failed') @endif {{$item->created_at->format('d-m-Y h:i:s')}}
@endif

@lang('labels.backend.dashboard.my_courses')

@if(count($purchased_courses) > 0) @foreach($purchased_courses as $item)
course_image != "") style="background-image: url({{asset('storage/uploads/'.$item->course_image)}})" @endif> @if($item->trending == 1)
@lang('labels.backend.dashboard.trending')
@endif
    @for($i=1; $i<=(int)$item->rating; $i++)
  • @endfor
{{$item->category->name}} {{ $item->students()->count() }} @lang('labels.backend.dashboard.students')
{{ $item->progress() }} % @lang('labels.backend.dashboard.completed')
@if($item->progress() == 100) @if(!$item->isUserCertified())
@csrf
@else
@lang('labels.frontend.course.certified')
@endif @endif
@endforeach @else

@lang('labels.backend.dashboard.no_data')

@lang('labels.backend.dashboard.buy_course_now')
@endif @if(count($purchased_bundles) > 0)

@lang('labels.backend.dashboard.my_course_bundles')

@foreach($purchased_bundles as $key=>$bundle) @php $key++ @endphp @if(count($bundle->courses) > 0) @foreach($bundle->courses as $item)
course_image != "") style="background-image: url({{asset('storage/uploads/'.$item->course_image)}})" @endif> @if($item->trending == 1)
@lang('labels.backend.dashboard.trending')
@endif
    @for($i=1; $i<=(int)$item->rating; $i++)
  • @endfor
{{$item->category->name}} {{ $item->students()->count() }} @lang('labels.backend.dashboard.students')
{{ $item->progress() }} % @lang('labels.backend.dashboard.completed')
@if($item->progress() == 100) @if(!$item->isUserCertified())
@csrf
@else
@lang('labels.frontend.course.certified')
@endif @endif
@endforeach @endif @endforeach
@endif @elseif(auth()->user()->hasRole('teacher'))

{{count(auth()->user()->courses) + count(auth()->user()->bundles)}}

@lang('labels.backend.dashboard.your_courses_and_bundles')

{{$students_count}}

@lang('labels.backend.dashboard.students_enrolled')

@lang('labels.backend.dashboard.recent_reviews') @lang('labels.backend.dashboard.view_all')

@if(count($recent_reviews) > 0) @foreach($recent_reviews as $item) @endforeach @else @endif
@lang('labels.backend.dashboard.course') @lang('labels.backend.dashboard.review') @lang('labels.backend.dashboard.time')
{{$item->reviewable->title}} {{$item->content}} {{$item->created_at->diffforhumans()}}
@lang('labels.backend.dashboard.no_data')

@lang('labels.backend.dashboard.recent_messages') @lang('labels.backend.dashboard.view_all')

@if(count($threads) > 0) @foreach($threads as $item) @endforeach @else @endif
@lang('labels.backend.dashboard.message_by') @lang('labels.backend.dashboard.message') @lang('labels.backend.dashboard.time')
{{$item->title}} {{$item->lastMessage->body}} {{$item->lastMessage->created_at->diffForHumans() }}
@lang('labels.backend.dashboard.no_data')
@elseif(auth()->user()->hasRole('administrator'))

{{$courses_count}}

@lang('labels.backend.dashboard.course_and_bundles')

{{$students_count}}

@lang('labels.backend.dashboard.students')

{{$teachers_count}}

@lang('labels.backend.dashboard.teachers')

@lang('labels.backend.dashboard.recent_orders') @lang('labels.backend.dashboard.view_all')

@if(count($recent_orders) > 0) @foreach($recent_orders as $item) @endforeach @else @endif
@lang('labels.backend.dashboard.ordered_by') @lang('labels.backend.dashboard.amount') @lang('labels.backend.dashboard.time') @lang('labels.backend.dashboard.view')
{{$item->user->full_name}} {{$item->amount.' '.$appCurrency['symbol']}} {{$item->created_at->diffforhumans()}}
@lang('labels.backend.dashboard.no_data')

@lang('labels.backend.dashboard.recent_contact_requests') @lang('labels.backend.dashboard.view_all')

@if(count($recent_contacts) > 0) @foreach($recent_contacts as $item) @endforeach @else @endif
@lang('labels.backend.dashboard.name') @lang('labels.backend.dashboard.email') @lang('labels.backend.dashboard.message') @lang('labels.backend.dashboard.time')
{{$item->name}} {{$item->email}} {{$item->message}} {{$item->created_at->diffforhumans()}}
@lang('labels.backend.dashboard.no_data')
@else

@lang('labels.backend.dashboard.title')

@endif
@endsection