@php $cats= App\Categories::find($cate); @endphp
@foreach($cats->courses->take(3) as $c) @if($c->status == 1)
@if($c['preview_image'] !== NULL && $c['preview_image'] !== '') course @else course @endif

by {{ $c->user['fname'] }}

@if( $c->type == 1)
@else @endif
{{ $c['title'] }}
@if($c['preview_image'] !== NULL && $c['preview_image'] !== '') student @else student @endif

{{ $c->short_detail }}

@if($c->type == 1) @if(Auth::check()) @if(Auth::User()->role == "admin") @else @php $order = App\Order::where('user_id', Auth::User()->id)->where('course_id', $c->id)->first(); @endphp @if(!empty($order) && $order->status == 1) @else @php $cart = App\Cart::where('user_id', Auth::User()->id)->where('course_id', $c->id)->first(); @endphp @if(!empty($cart))
{{ csrf_field() }}
@else
{{ csrf_field() }}
@endif @endif @endif @else @endif @else @if(Auth::check()) @if(Auth::User()->role == "admin") @else @php $enroll = App\Order::where('user_id', Auth::User()->id)->where('course_id', $c->id)->first(); @endphp @if($enroll == NULL) @else @endif @endif @else @endif @endif
    @if(Auth::check()) @php $wish = App\Wishlist::where('user_id', Auth::User()->id)->where('course_id', $c->id)->first(); @endphp @if ($wish == NULL)
  • {{ csrf_field() }}
  • @else
  • {{ csrf_field() }}
  • @endif @else
  • @endif
    @if(Auth::check()) @php $wish = App\Wishlist::where('user_id', Auth::User()->id)->where('course_id', $c->id)->first(); @endphp @if ($wish == NULL)
  • {{ csrf_field() }}
  • @else
  • {{ csrf_field() }}
  • @endif @else
  • @endif
@endif @endforeach
@php $count = $cats->courses->where('status','=','1')->count(); @endphp @if($count >= 3)
{{ __('frontstaticword.ViewMore') }}
@endif