@extends('front_end.layouts.home') @php $showRightSidebar = false; @endphp @section('title', 'My Wishlist') @section('left_sidebar') @include('front_end.pages.courses.courses_left_sidebar') @endsection @section('content')

My Wishlist

{{ $wishlist->total() }} courses saved for later

@if($wishlist->count() > 0)
@foreach($wishlist as $item)
{{ $item->course->title }} @if($item->course->discount_price && $item->course->discount_ends_at > now())
{{ round((($item->course->price - $item->course->discount_price) / $item->course->price) * 100) }}% OFF
@endif
{{ ucfirst($item->course->level) }} Added {{ $item->created_at->diffForHumans() }}
{{ $item->course->title }}

{{ $item->course->instructor->name ?? 'Unknown Instructor' }}

{{ number_format($item->course->average_rating, 1) }} ({{ $item->course->reviews_count ?? 0 }})
{{ $item->course->total_students ?? 0 }}
@if($item->course->price == 0) Free @elseif($item->course->discount_price && $item->course->discount_ends_at > now()) ${{ number_format($item->course->discount_price, 2) }} ${{ number_format($item->course->price, 2) }}
Sale ends in {{ now()->diffInDays($item->course->discount_ends_at) }} days
@else ${{ number_format($item->course->price, 2) }} @endif
@csrf @method('DELETE')
@endforeach
{{ $wishlist->links('pagination::bootstrap-5') }}
@else

Your wishlist is empty

Save courses you're interested in by clicking the heart icon on course cards.

Browse Courses
@endif
@push('scripts') @endpush @endsection