@extends('layouts.master') @section('content')
{{ Form::open(['url' => route('courses.update', $course->id), 'method' => 'PUT']) }}

@lang('course/fields.courses')

@if ($errors->has('name')) {{ $errors->first('name') }} @endif
@if ($errors->has('description')) {{ $errors->first('description') }} @endif
{{ Form::select('teacher_id', $users, old('teacher_id', $course->teacher_id), ['class' => 'form-control custom-select']) }} @if ($errors->has('teacher_id')) {{ $errors->first('teacher_id') }} @endif
{{ Form::close() }}

Lessons

@foreach($lessons as $lesson) @endforeach
@lang('lesson/fields.id') @lang('lesson/fields.title')
{{ $lesson->id }} {{ $lesson->title }} @lang('course/actions.edit') @if($lesson->status == \App\Enums\LessonStatus::DISABLED) {{ Form::open(['url' => route('lessons.update', $lesson->id), 'method' => 'PUT']) }} {{ Form::close() }} @endif {{ Form::open(['url' => route('lessons.destroy', $lesson->id), 'method' => 'DELETE']) }} {{ Form::close() }}
@lang('lesson/fields.id') @lang('lesson/fields.title')
@endsection @section('scripts') @endsection