@extends('layouts.app') @section('content')

@lang('global.articles.title')

{!! Form::model($article, ['method' => 'PUT', 'route' => ['admin.articles.update', $article->id], 'files' => true,'class'=>'formvalidation']) !!}
@lang('global.app_edit')
{!! Form::label('title', trans('global.articles.fields.title').'*', ['class' => 'control-label form-label']) !!}
{!! Form::text('title', old('title'), ['class' => 'form-control', 'placeholder' => 'Title', 'required' => '']) !!}

@if($errors->has('title'))

{{ $errors->first('title') }}

@endif
{!! Form::label('category_id', trans('global.articles.fields.category-id').'', ['class' => 'control-label']) !!} {!! Form::select('category_id[]', $category_ids, old('category_id') ? old('category_id') : $article->category_id->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-category_id' ]) !!}

@if($errors->has('category_id'))

{{ $errors->first('category_id') }}

@endif

{!! Form::label('available_for', trans('global.articles.fields.available-for').'*', ['class' => 'control-label']) !!} {!! Form::select('available_for[]', $available_fors, old('available_for') ? old('available_for') : $article->available_for->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-available_for' , 'required' => '']) !!}

@if($errors->has('available_for'))

{{ $errors->first('available_for') }}

@endif

{!! Form::label('tag_id', trans('global.articles.fields.tag-id').'', ['class' => 'control-label']) !!} {!! Form::select('tag_id[]', $tag_ids, old('tag_id') ? old('tag_id') : $article->tag_id->pluck('id')->toArray(), ['class' => 'form-control select2', 'multiple' => 'multiple', 'id' => 'selectall-tag_id' ]) !!}

@if($errors->has('tag_id'))

{{ $errors->first('tag_id') }}

@endif
@if ($article->featured_image) @endif
{!! Form::label('featured_image', trans('global.articles.fields.featured-image').'', ['class' => 'control-label']) !!} {!! Form::file('featured_image', ['class' => 'form-control', 'style' => 'margin-top: 4px;']) !!} {!! Form::hidden('featured_image_max_size', 10) !!} {!! Form::hidden('featured_image_max_width', 1000) !!} {!! Form::hidden('featured_image_max_height', 1000) !!}

{{trans('others.global_file_types_gallery')}}

@if($errors->has('featured_image'))

{{ $errors->first('featured_image') }}

@endif
{!! Form::label('excerpt', trans('global.articles.fields.excerpt').'', ['class' => 'control-label']) !!} {!! Form::textarea('excerpt', old('excerpt'), ['class' => 'form-control ', 'placeholder' => 'Excerpt']) !!}

@if($errors->has('excerpt'))

{{ $errors->first('excerpt') }}

@endif

{!! Form::label('page_text', trans('global.articles.fields.page-text').'', ['class' => 'control-label']) !!} {!! Form::textarea('page_text', old('page_text'), ['class' => 'form-control editor', 'placeholder' => 'Page Text']) !!}

@if($errors->has('page_text'))

{{ $errors->first('page_text') }}

@endif
{!! Form::submit(trans('global.app_update'), ['class' => 'btn btn-danger wave-effect']) !!} {!! Form::close() !!} @stop @section('javascript') @parent @include('admin.common.standard-ckeditor') @stop