@extends('layouts.app') @php $page_title = __( 'essentials::lang.add_knowledge_base' ); $kb_type = ''; if(!empty($parent)) { $kb_type = $parent->kb_type == 'knowledge_base' ? 'section' : 'article'; } if($kb_type == 'section') { $page_title = __( 'essentials::lang.add_section' ); } else if($kb_type == 'article') { $page_title = __( 'essentials::lang.add_article' ); } @endphp @section('title', $page_title) @section('content') @include('essentials::layouts.nav_essentials')
{!! Form::open(['url' => action('\Modules\Essentials\Http\Controllers\KnowledgeBaseController@store'), 'method' => 'post' ]) !!} @if(!empty($parent)) {!! Form::hidden('kb_type', $kb_type); !!} {!! Form::hidden('parent_id', $parent->id); !!} @endif @component('components.widget', ['title' => $page_title])
{!! Form::label('title', __( 'essentials::lang.title' ) . ':*') !!} {!! Form::text('title', null, ['class' => 'form-control', 'placeholder' => __( 'essentials::lang.title' ), 'required' ]); !!}
{!! Form::label('content', __( 'essentials::lang.content' ) . ':') !!} {!! Form::textarea('content', null, ['class' => 'form-control', 'placeholder' => __( 'essentials::lang.content' ) ]); !!}
@if(empty($parent))
{!! Form::label('share_with', __( 'essentials::lang.share_with' ) . ':') !!} {!! Form::select('share_with', ['public' => __('essentials::lang.public'), 'private' => __( 'essentials::lang.private' ), 'only_with' => __( 'essentials::lang.only_with' )], 'public', ['class' => 'form-control select2' ]); !!}
@endif
@endcomponent {!! Form::close() !!} @stop @section('javascript') @endsection