@include('admin.message')

{{ __('adminstaticword.Course') }}

@if(Auth::user()->role == 'admin') + {{ __('adminstaticword.Add') }} {{ __('adminstaticword.Course') }}
{{--
@csrf
@method('delete') @csrf
--}}
@csrf 創建課程範例檔
@csrf 課程下架範例檔
@endif @if(env('ENABLE_INSTRUCTOR_SUBS_SYSTEM') == 1) @if(Auth::user()->role == 'instructor') @php $instructor_plan = App\PlanSubscribe::where('user_id', Auth::user()->id)->orderBy('created_at', 'desc')->first(); if(isset($instructor_plan)) { $allowed_course = $instructor_plan->plans->courses_allowed; $total_course_count = App\Course::where('user_id', Auth::User()->id)->count(); } @endphp @endif {{-- @if(Auth::user()->role == 'instructor') @if(isset($instructor_plan)) @if($allowed_course > $total_course_count) + {{ __('adminstaticword.Add') }} {{ __('adminstaticword.Course') }} @endif @else
  • {{ __('Instructor Subscription is enabled on portal to add courses you have to buy Plans from your dashboard') }}
@if(Auth::User()->role == "instructor")

{{ __('Subscribe Now') }}


  • {{ __('frontstaticword.InstructorPlan') }}
  • @endif
    @endif @endif --}} {{-- @else --}} {{-- @if(Auth::user()->role == 'instructor') + {{ __('adminstaticword.Add') }} {{ __('adminstaticword.Course') }} @endif --}} @endif
    @csrf


    @if(Auth::User()->role == "admin")
    {{-- --}} @foreach($course as $cat) @php $web_views = \App\CourseView::where('device', 'web')->where('course_id', $cat->id)->count(); $app_views = \App\CourseView::where('device', 'app')->where('course_id', $cat->id)->count(); @endphp {{-- --}} @endforeach
    {{-- @foreach($course as $cat) @endforeach --}}
    {!! $course->render() !!}
    {{-- @else @php $cors = App\Course::where('user_id', Auth::User()->id)->get(); @endphp @foreach($cors as $cor) @endforeach --}} @endif
    @section('scripts') @endsection