/home/techb158/ileadtechnology.com/resources/views/front
Edit: /home/techb158/ileadtechnology.com/resources/views/front/course_detail.blade.php (113673B)
@php
$url = URL::current();
@endphp
@extends('theme.master')
@section('title', "$course->title")
@section('content')
@include('admin.message')
{{ $course['title'] }}
{{ $course['short_detail'] }}
@if(Auth::check())
@if($wish == NULL)
@csrf
{{ __('frontstaticword.Wishlist') }}
@else
@csrf
{{ __('frontstaticword.Wishlisted') }}
@endif
@else
{{ __('frontstaticword.Wishlist') }}
@endif
@if($course['preview_image'] !== NULL && $course['preview_image'] !== '')
@else
@endif
@if($course->video !="" || $course->url !="")
@endif
@if($course->type == 1)
@if($course->discount_price == !NULL)
{{ $course['discount_price'] }}
{{ $course['price'] }}
@else
{{ $course['price'] }}
@endif
@if(Auth::check())
@if(Auth::User()->role == "admin")
@else
@if(isset($course->duration))
@if($course->duration_type == "m")
{{ __('frontstaticword.EnrollDuration') }}: {{ $course->duration }} Months
@else
{{ __('frontstaticword.EnrollDuration') }}: {{ $course->duration }} Days
@endif
@endif
@if(!empty($order) && $order->status == 1)
@elseif(isset($course_id) && in_array($course->id, $course_id))
@elseif(!empty($instruct_course->id) && $instruct_course->id == $course->id)
@else
@if(!empty($cart))
{{ csrf_field() }}
@else
{{ csrf_field() }}
@endif
@endif
@endif
@else
@endif
@else
{{ __('frontstaticword.Free') }}
@if(Auth::check())
@if(Auth::User()->role == "admin")
@else
@php
$enroll = App\Order::where('user_id', Auth::User()->id)->where('course_id', $course->id)->first();
@endphp
@if($enroll == NULL)
@else
@endif
@endif
@else
@endif
@endif
@if(isset($course->refund_policy_id))
@php
$days = $course->policy->days;
$detail = $course->policy->detail;
@endphp
{{ $days }}-Day Money-Back Guarantee
@endif
@if($courseinclude->isNotEmpty())
{{ __('frontstaticword.CourseIncludes') }}
@foreach($course->include as $in)
@if($in->status ==1)
{{ str_limit($in->detail, $limit = 50, $end = '...') }}
@endif
@endforeach
@endif
@php
$url= URL::current();
@endphp
@php
echo Share::currentPage('', [], '
')
->facebook()
->twitter()
->linkedin('Extra linkedin summary can be passed here')
->whatsapp()
->telegram();
@endphp
isdetail==1 && $ad->status==1) {
$code = $ad->code;
echo html_entity_decode($code);
}
}
?>
@if($whatlearns->isNotEmpty())
{{ __('frontstaticword.Whatlearn') }}
@foreach($course['whatlearns'] as $wl)
@if($wl->status ==1)
{{ str_limit($wl['detail'], $limit = 120, $end = '...') }}
@endif
@endforeach
@endif
@if($coursechapters->isNotEmpty())
{{ __('frontstaticword.CourseContent') }}
@php
// FSMS
function convertToHoursMins($time, $format = '%02d:%02d') {
if ($time < 1) {
return;
}
$hours =floor($time / 60);
$minutes = ($time % 60);
return sprintf($format, $hours, $minutes);
}
$classtwo = App\CourseClass::where('course_id', $course->id)->sum("duration");
// echo $duration_round2 = round($classtwo,2);
$chapterCount = $coursechapters->count();
$classesCount = count(App\CourseClass::where('course_id', $course->id)->get());
$courseDuration = convertToHoursMins($classtwo, '%02dh %02dm total length');
// FSMS
@endphp
{{ $chapterCount . " sections • " .$classesCount . " lectures • " . $courseDuration }}
Expand all sections
Collapse all sections
@foreach($coursechapters as $chapter)
@if($chapter->status == 1 and $chapter->count() > 0 )
@foreach($courseclass as $class)
@if($class->status == 1)
@if($class->coursechapter_id == $chapter->id)
@if($class->type =='video' )
@endif
@if($class->type =='audio' )
@endif
@if($class->type =='image' )
@endif
@if($class->type =='pdf' )
@endif
@if($class->type =='zip' )
@endif
{{ $class['title'] }}
@if($class->date_time != NULL)
Live at: {{ $class->date_time }}
@endif
@if($class->detail != NULL)
@endif
{!! $class->detail !!}
@if($class->preview_url != NULL || $class->preview_video != NULL )
{{ __('frontstaticword.preview') }}
@endif
@if($class->type =='video')
{{ $class['duration'] }}{{ __('frontstaticword.min') }}
@else
{{ $class['size'] }}mb
@endif
@endif
@endif
@endforeach
@endif
@endforeach
@endif
{{ __('frontstaticword.Requirements') }}
{{ __('frontstaticword.Description') }}
{!! $course->detail !!}
@php
$alreadyrated = App\ReviewRating::where('course_id', $course->id)->limit(1)->first();
@endphp
@if($alreadyrated == !NULL)
@if($alreadyrated->featured == 1)
{{ __('frontstaticword.FeaturedReview') }}
learn * 5;
$user_price_t = $alreadyrated->price * 5;
$user_value_t = $alreadyrated->value * 5;
$user_sub_total = $user_sub_total + $user_learn_t + $user_price_t + $user_value_t;
$user_count = ($user_count * 3) * 5;
$rat1 = $user_sub_total / $user_count;
$ratings_var1 = ($rat1 * 100) / 5;
?>
@if(isset($alreadyrated))
@foreach($coursereviews as $rating)
@if($rating->review == !null && $rating->featured == 1)
{{ str_limit($rating->user->fname, $limit = 1, $end = '') }}{{ str_limit($rating->user->lname, $limit = 1, $end = '') }}
{{ $rating->user['fname'] }} {{ $rating->user['lname'] }}
{{ date('jS F Y', strtotime($rating['created_at'])) }}
{{ $rating['review'] }}
@auth
{{ __('frontstaticword.helpful') }}?
@php
$help = App\ReviewHelpful::where('user_id', Auth::User()->id)->where('review_id', $rating->id)->first();
@endphp
@if($help['review_like'] == '1')
{{ csrf_field() }}
{{ __('frontstaticword.Yes') }}
@else
{{ csrf_field() }}
{{ __('frontstaticword.Yes') }}
@endif
@if($help['review_dislike'] == '1')
{{ csrf_field() }}
{{ __('frontstaticword.No') }}
@else
{{ csrf_field() }}
{{ __('frontstaticword.No') }}
@endif
{{ __('frontstaticword.Report') }}
@endauth
@endif
@endforeach
@endif
@endif
@endif
@auth
@php
$user_enrolled = App\Order::where('course_id', $course->id)->where('user_id', Auth::user()->id) ->first();
@endphp
@if( $user_enrolled != NULL || Auth::user()->role == 'admin' )
@if( ! $bigblue->isEmpty() )
{{ __('frontstaticword.BigBlueMeetings') }}
@foreach($bigblue as $bbl)
@if($bbl->is_ended != 1)
@endif
@endforeach
@endif
@if( ! $meetings->isEmpty() )
{{ __('frontstaticword.ZoomMeetings') }}
@foreach($meetings as $meeting)
@endforeach
@endif
@endif
@endauth
{{ __('frontstaticword.RecentCourses') }}
@php
$items = App\Course::orderBy('created_at','desc')->limit(5)->get()
@endphp
@foreach($items as $item)
@if($item->status == 1)
@if($item->preview_image !== NULL && $item->preview_image !== '')
@else
@endif
{{ __('frontstaticword.LastUpdated') }} {{ date('jS F Y', strtotime($item['updated_at'])) }}
{{ $item->order->count() }}
@if($item->type==1)
@if($item->discount_price == !NULL)
{{ $item->discount_price }}
{{ $item['price'] }}
@else
@endif
@else
{{ __('frontstaticword.Free') }}
@endif
@if(Auth::check())
@php
$wishtt = App\Wishlist::where('user_id', Auth::User()->id)->where('course_id', $item->id)->first();
@endphp
@if ($wishtt == NULL)
{{ csrf_field() }}
@else
{{ csrf_field() }}
@endif
@else
@endif
@endif
@endforeach
{{ __('frontstaticword.AboutInstructor') }}
@if($course->user->user_img != null || $course->user->user_img !='')
@else
@endif
{{ __('frontstaticword.AboutInstructor') }}
{!! $course->user['detail'] !!}
@if(! $reviews->isEmpty())
{{ __('frontstaticword.StudentFeedback') }}
where('status',"1")->WhereNotNull('review')->get();
foreach($reviews as $review){
$learn = $review->learn*5;
$price = $review->price*5;
$value = $review->value*5;
$sub_total = $sub_total + $learn + $price + $value;
}
$count = ($count*3) * 5;
if($count != "")
{
$rat = $sub_total/$count;
$ratings_var = ($rat*100)/5;
$overallrating = ($ratings_var/2)/10;
}
?>
{{ round($overallrating, 1) }}
id)->where('status','1')->get();
?>
@if(!empty($reviews[0]))
id)->count();
foreach($reviews as $review){
$learn = $review->learn*5;
$price = $review->price*5;
$value = $review->value*5;
$sub_total = $sub_total + $learn + $price + $value;
}
$count = ($count*3) * 5;
$rat = $sub_total/$count;
$ratings_var = ($rat*100)/5;
?>
@else
@endif
{{ __('frontstaticword.CourseRating') }}
id)->where('status','1')->get();
?>
@if(!empty($reviews[0]))
id)->count();
foreach($reviews as $review){
$learn = $review->learn*5;
$total = $total + $learn;
}
$count = ($count*1) * 5;
$rat = $total/$count;
$ratings_var = ($rat*100)/5;
?>
@else
@endif
{{ round($ratings_var) }}%
id)->where('status','1')->get();
?>
@if(!empty($reviews[0]))
id)->count();
foreach($reviews as $review){
$price = $review->price*5;
$total = $total + $price;
}
$count = ($count*1) * 5;
$rat = $total/$count;
$ratings_var = ($rat*100)/5;
?>
@else
@endif
{{ round($ratings_var) }}%
id)->where('status','1')->get();
?>
@if(!empty($reviews[0]))
id)->count();
foreach($reviews as $review){
$value = $review->value*5;
$total = $total + $value;
}
$count = ($count*1) * 5;
$rat = $total/$count;
$ratings_var = ($rat*100)/5;
?>
@else
@endif
{{ round($ratings_var) }}%
@endif
@auth
@php
$orders = App\Order::where('user_id', Auth::User()->id)->where('course_id', $course->id)->first();
@endphp
@if(!empty($orders))
{{ __('frontstaticword.Reviews') }}
{{ csrf_field() }}
{{ __('frontstaticword.Writereview') }}:
{{ __('frontstaticword.Submit') }}
@endif
@endauth
@php
$alreadyrated = App\ReviewRating::where('course_id', $course->id)->first();
@endphp
@if($alreadyrated == !NULL)
learn * 5;
$user_price_t = $alreadyrated->price * 5;
$user_value_t = $alreadyrated->value * 5;
$user_sub_total = $user_sub_total + $user_learn_t + $user_price_t + $user_value_t;
$user_count = ($user_count * 3) * 5;
$rat1 = $user_sub_total / $user_count;
$ratings_var1 = ($rat1 * 100) / 5;
?>
@if(isset($alreadyrated))
@foreach($course->review as $rating)
@if($rating->review == !null && $rating->status == 1 && $rating->approved == 1)
{{ str_limit($rating->user->fname, $limit = 1, $end = '') }}{{ str_limit($rating->user->lname, $limit = 1, $end = '') }}
{{ date('d-m-Y', strtotime($rating['created_at'])) }}
{{ $rating->user['fname'] }} {{ $rating->user['lname'] }}
@auth
{{ __('frontstaticword.helpful') }}?
@php
$help = App\ReviewHelpful::where('user_id', Auth::User()->id)->where('review_id', $rating->id)->first();
@endphp
@if($help['review_like'] == '1')
{{ csrf_field() }}
{{ __('frontstaticword.Yes') }}
@else
{{ csrf_field() }}
{{ __('frontstaticword.Yes') }}
@endif
@if($help['review_dislike'] == '1')
{{ csrf_field() }}
{{ __('frontstaticword.No') }}
@else
{{ csrf_field() }}
{{ __('frontstaticword.No') }}
@endif
{{-- report --}}
{{ __('frontstaticword.Report') }}
@php
$courses = App\Course::first();
@endphp
{{ csrf_field() }}
{{ __('frontstaticword.Detail') }}:*
@endauth
@endif
@endforeach
@endif
@endif
@if(!$relatedcourse->isEmpty())
{{ __('frontstaticword.RelatedCourses') }}
@foreach($relatedcourse as $rel)
@if($rel->courses->status == 1)
@if($rel->courses['preview_image'] !== NULL && $rel->courses['preview_image'] !== '')
@else
@endif
{{-- Add to wishlisht --}}
@if (Auth::check())
@php
$wishtt = App\Wishlist::where('user_id', Auth::User()->id)->where('course_id', $rel->course_id)->first();
@endphp
@if ($wishtt == NULL)
{{ csrf_field() }}
@else
{{ csrf_field() }}
@endif
@else
@endif
{{-- Add to wishlisht end--}}
@endif
@endforeach
@endif
@if(Auth::check())
@else
@endif
@auth
{{ csrf_field() }}
{{ __('frontstaticword.Detail') }}:*
@endauth
@endsection
@section('custom-script')
@endsection