@extends('layouts.admin') @section('css') @endsection @section('content')
{{ Form::open(array('route' => $routes, 'method' => 'POST', 'id' => 'ajaxSave','files' => true ))}}
@php $selectedStore = isset($data->store_id) ? explode(',', $data->store_id) : []; @endphp
{!! Form::label('stores', __('food_offers.stores'), ['class' => 'control-label mb-2']) !!} {!! Form::select('stores[]', $stores, $selectedStore, [ 'class' => 'form-control select2', 'multiple' => 'true', 'data-actions-box' => 'true', 'data-width' => '100%',]) !!}
{!! Form::file('image', ['class' => 'custom-file-upload-field']) !!}
@if(isset($data->image))

@endif
{!! Form::label('category_id', __('food_offers.category'), ['class' => 'control-label mb-2']) !!} {!! Form::select('category_id', $subCategory, $data->category_id, [ 'class' => 'form-control select2-new __offer_cat __select2_change', 'data-target' => '#cat_variations', 'data-route' => route('global-items.get-variation-category'), ]) !!}
{!! Form::label('variation_id', __('food_offers.variation'), ['class' => 'control-label mb-2']) !!} {!! Form::select('variation_id', $variations, $data->variation_id, ['class' => 'form-control select2-new','id' => 'cat_variations']) !!}
{{Form::label('id', __('food_offers.buy-quantity'), array('class' => 'control-label'))}} {{ Form::text('buy_quantity',$data->buy_quantity, array('class' => 'form-control'))}}
{{Form::label('id', __('food_offers.free-quantity'), array('class' => 'control-label'))}} {{ Form::text('free_quantity',$data->free_quantity, array('class' => 'form-control'))}}
{{Form::label('id', __('food_offers.start_date'), array('class' => 'control-label'))}} {!! Form::text('start_date',(isset($data)?dateFormat($data->start_date,'d-m-Y h:i A'):''),['class'=>'form-control datepicker-input-sch']) !!}
{{Form::label('id', __('food_offers.end_date'), array('class' => 'control-label'))}} {!! Form::text('end_date',(isset($data)?dateFormat($data->end_date,'d-m-Y h:i A'):''),['class'=>'form-control datepicker-input-sch']) !!}
{{Form::label('id', __('food_offers.description'), array('class' => 'control-label'))}} {{ Form::textarea('description',$data->description, array('class' => 'form-control'))}}
  • {{ Form::submit( __('common.save'), array('class' => 'btn btn-primary width80'))}}
{{ Form::close()}}
@endsection @section('script') @endsection