@extends('admin.layout.main') @section('title', isset($content) ? 'Edit Content' : 'Add Content') @section('style') @endsection @section('content')

{{ isset($content) ? 'Edit Content' : 'Add Content' }}

Back
@if(isset($content)) {!! Form::model($content, ['route' => ['contents.update', $content->id], 'method' => 'PUT', 'files' => true]) !!} @else {!! Form::open(['route' => 'contents.store', 'method' => 'POST', 'files' => true]) !!} @endif
{!! Form::label('title', 'Title') !!} {!! Form::text('title', $content->title ?? '', ['class' => 'form-control', 'required']) !!}
{!! Form::label('content_category', 'Content Category') !!} {!! Form::select('content_category', [ 'Educational' => 'Educational', 'Tutorial' => 'Tutorial', 'Article' => 'Article' ], null, [ 'class' => 'form-control' ]) !!}
{!! Form::label('file', 'Add File') !!} {!! Form::file('file', ['class' => 'form-control']) !!} @if(isset($content) && $content->file_path)

Current File: View File

@endif
{!! Form::label('status', 'Status') !!} {!! Form::select('status', [1 => 'Active', 0 => 'Inactive'], null, ['class' => 'form-control']) !!}
{!! Form::close() !!}
@endsection @section('scripts') @endsection