@extends('layouts.app') @section('content')
@if(isset($promo)) {{ Form::model($promo, array('route' => ['promo.update'], 'files' => true)) }} {{ Form::hidden('_method', 'PATCH') }} {{ Form::hidden('promo_id', $promo->id, ['id' => 'promo_id']) }} @else {{ Form::open(array('url' => '/backend/promo', 'method' => 'POST', 'files' => true)) }} @endif

Add/Edit Promo

{{Form::submit('Save')}}

@if(count($errors) > 0)
@foreach($errors->all() as $error)

{{ $error }}

@endforeach
@endif
{{Form::label('name', 'Name')}}*
{{Form::text('name', null, array('required' => 'required'))}}
@if(isset($promo)) @endif
{{Form::label('start_period', 'Start Period')}}*
{{Form::text('start_period', null, array('required' => 'required','id'=>'datepicker-start', 'readonly'))}}
{{Form::label('end_period', 'End Period')}}*
{{Form::text('end_period', null, array('required' => 'required','id'=>'datepicker-end', 'readonly'))}}
{{Form::label('description', 'Description')}}*
{{Form::textarea('description', null, array('required' => 'required'))}}
{{Form::label('detail', 'More Detail')}}*
{{--
{{Form::textarea('detail', null, array('required' => 'required', 'id' => 'detail'))}}
--}}
{{Form::label('image_banner', 'Image Banner')}}*
@if(isset($promo)) @if($promo->image_banner) @endif @endif {{Form::file('image_banner', null, array('required' => 'required'))}}
{{Form::label('template', 'Template')}}
{{Form::submit('Save')}}
{{ Form::close() }}
@endsection @push('after-script') @endpush @push('after-style') @endpush