@if (session('post-ok'))
@component('back.components.alert')
@slot('type')
success
@endslot
{!! session('post-ok') !!}
@endcomponent
@endif
@include('back.partials.boxinput', [
'box' => [
'type' => 'box-primary',
'title' => __('Title'),
],
'input' => [
'name' => 'title',
'value' => isset($post) ? $post->title : '',
'input' => 'text',
'required' => true,
],
])
@include('back.partials.boxinput', [
'box' => [
'type' => 'box-primary',
'title' => __('Excerpt'),
],
'input' => [
'name' => 'excerpt',
'value' => isset($post) ? $post->excerpt : '',
'input' => 'textarea',
'rows' => 3,
'required' => true,
],
])
@include('back.partials.boxinput', [
'box' => [
'type' => 'box-primary',
'title' => __('Body'),
],
'input' => [
'name' => 'body',
'value' => isset($post) ? $post->body : '',
'input' => 'textarea',
'rows' => 10,
'required' => true,
],
])
@component('back.components.box')
@slot('type')
warning
@endslot
@slot('boxTitle')
@lang('Categories')
@endslot
@include('back.partials.input', [
'input' => [
'name' => 'categories',
'values' => isset($post) ? $post->categories : collect(),
'input' => 'select',
'options' => $categories,
],
])
@endcomponent
@component('back.components.box')
@slot('type')
danger
@endslot
@slot('boxTitle')
@lang('Tags')
@endslot
@include('back.partials.input', [
'input' => [
'name' => 'tags',
'value' => isset($post) ? implode(',', $post->tags->pluck('tag')->toArray()) : '',
'input' => 'text',
'required' => false,
],
])
@endcomponent
@component('back.components.box')
@slot('type')
success
@endslot
@slot('boxTitle')
@lang('Details')
@endslot
@include('back.partials.input', [
'input' => [
'name' => 'slug',
'value' => isset($post) ? $post->slug : '',
'input' => 'text',
'title' => __('Slug'),
'required' => true,
],
])
@include('back.partials.input', [
'input' => [
'name' => 'active',
'value' => isset($post) ? $post->active : false,
'input' => 'checkbox',
'title' => __('Status'),
'label' => __('Active'),
],
])
@endcomponent
@component('back.components.box')
@slot('type')
primary
@endslot
@slot('boxTitle')
@lang('Image')
@endslot
@slot('footer')
{!! $errors->first('image', '
:message') !!}
@endslot
@endcomponent
@component('back.components.box')
@slot('type')
info
@endslot
@slot('boxTitle')
SEO
@endslot
@include('back.partials.input', [
'input' => [
'name' => 'meta_description',
'value' => isset($post) ? $post->meta_description : '',
'input' => 'text',
'title' => __('META Description'),
'input' => 'textarea',
'rows' => 3,
'required' => true,
]
])
@include('back.partials.input', [
'input' => [
'name' => 'meta_keywords',
'value' => isset($post) ? $post->meta_keywords : '',
'input' => 'text',
'title' => __('META Keywords'),
'input' => 'textarea',
'rows' => 3,
'required' => true,
]
])
@include('back.partials.input', [
'input' => [
'name' => 'seo_title',
'value' => isset($post) ? $post->seo_title : '',
'input' => 'text',
'title' => __('SEO Title'),
'required' => true,
],
])
@endcomponent
@endsection
@section('js')
@endsection