@extends('admins.layouts.index') @section('content') {!! Form::model($model, ['method'=>'post','class'=>'form-horizontal','files'=>true]) !!}

{{__('Basic Information')}}

@foreach($model->photos()->orderBy('is_header','desc')->get() as $photo)
@if($photo->is_header)
{{ __('Header') }}
@else @endif
{{ __('Remove Photo') }}
@endforeach
@foreach(App\Translation::get_lang_array() as $index => $row) @php $data = $model->getFormTranslation($row->lang); @endphp
{{ __('Basic Information') }}
{!! Form::label('locale['.$row->lang.'][title]', __('Title'), ['class'=>'col-sm-3 col-form-label text-right']) !!}
{!! Form::text('locale['.$row->lang.'][title]', $model->id ? (isset($data['title']) ? $data['title']:null):null, ['id'=>'locale['.$row->lang.'][title]','class'=>'form-control '.($errors->first('locale.*.title') ? 'is-invalid' : ''), $index == 0 ? 'autofocus':'']) !!} {!!$errors->first('locale.*.title', ':message')!!}
{!! Form::label('locale['.$row->lang.'][keywords]', __('Keywords'), ['class'=>'col-sm-3 col-form-label text-right']) !!}
{!! Form::text('locale['.$row->lang.'][keywords]', $model->id ? (isset($data['keywords']) ? $data['keywords']:null):null, ['id'=>'locale['.$row->lang.'][keywords]','class'=>'form-control '.($errors->first('locale.*.keywords') ? 'is-invalid' : ''), $index == 0 ? 'autofocus':'']) !!} {!!$errors->first('locale.*.keywords', ':message')!!}
{!! Form::label('locale['.$row->lang.'][description]', __('Description'), ['class'=>'col-sm-2 col-form-label text-right']) !!}
{!! Form::textarea('locale['.$row->lang.'][description]', $model->id ? (isset($data['description']) ? $data['description']:null):null, ['id'=>'locale['.$row->lang.'][description]','class'=>'textarea form-control '.($errors->first('locale.*.description') ? 'is-invalid' : ''), $index == 0 ? 'autofocus':'']) !!} {!!$errors->first('locale.*.description', ':message')!!}
{!! Form::label('locale['.$row->lang.'][tags]', __('Tags'), ['class'=>'col-sm-3 col-form-label text-right']) !!}
{!! Form::text('locale['.$row->lang.'][tags]', $model->id ? (isset($data['tags']) ? $data['tags']:null):null, ['id'=>'tags_'.$row->lang,'class'=>'form-control '.($errors->first('locale.*.tags') ? 'is-invalid' : ''), $index == 0 ? 'autofocus':'']) !!} {!!$errors->first('locale.*.tags', ':message')!!}
@endforeach

{{__('Basic Information')}}

{!! Form::label('photo_url[]', __('Photo'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::file('photo_url[]', ['id'=>'photo_url','class'=>'custom-file-input '.($errors->first('photo_url[]') ? 'is-invalid' : ''),'multiple'=>true]) !!} {!! Form::label('photo_url[]', __('Choose File'), ['class'=>'custom-file-label']) !!}
{!! Form::label('published_at', __('Published At'), ['class'=>'col-sm-4 col-form-label text-right']) !!}
{!! Form::text('published_at', $model->id ? $model->published_at:$model->date_displayed('now'), ['id'=>'published_at','class'=>'datepicker form-control '.($errors->first('published_at') ? 'is-invalid' : ''),'placeholder'=>__('Published At')]) !!} {!!$errors->first('published_at', ':message')!!}
{!! Form::close() !!} @endsection @section('script') @endsection