@extends('admin.layout.app') @section('title', 'Create New Course') @push('styles') @endpush @section('content')
@if (!$course->publish_status)
@csrf @method('PATCH')
@endif
@if ($course->image) Course Image @else Default Image @endif

{{ $course->name }}

  • Level : {{ $course->level->name }}
  • Description : {{ $course->description }}
  • Author: {{ $course->author }}
  • @if ($course->publish_status) Published @else Not Published @endif
@if (request('search')) @endif
@if ($units->count())

Units

@endif @forelse ($units as $unit)

{{ Str::limit($unit->description, 120) }}

@if (count($unit->lesson_types)) @php $badgeColors = [ 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', ]; $colorIndex = 0; @endphp @foreach ($unit->lesson_types as $lessonTypeId) @php $type = $lessonTypes->firstWhere('id', $lessonTypeId); $color = $badgeColors[$colorIndex % count($badgeColors)]; $colorIndex++; @endphp @if ($type) {{ $type->name }} @endif @endforeach @endif
@empty
No units in this course
@endforelse
Showing {{ $units->firstItem() }} to {{ $units->lastItem() }} of {{ $units->total() }} entries
Showing {{ $units->firstItem() }} to {{ $units->lastItem() }} of {{ $units->total() }} entries
{{ $units->links() }}
@endsection @push('scripts') @endpush