@php // $hasPaid = $course->courseInvoice->contains('payment_status', 'paid'); $hasPaid = false; if ($course && $course->studentInvoices) { $hasPaid = $course->studentInvoices->contains('payment_status', 'paid'); } @endphp @if ($hasPaid) {{-- @dd($course) --}} @if ($course->schedule_type == 'track') {{-- Student --}} @include('dashboard.course.student_modal', ['course' => $course]) @else {{-- Student --}}
@endif @else @endif