@extends('admin.layouts.layout') @section('css') @endsection @section('main') @php($tab_st = !empty($id)?'':' disabled') @php($countries=\App\Helpers\Helper::getCountries()) @php($StateProvience = \App\Helpers\Helper::StateProvience(101))
{{$moduleName}}
@if($id) {!! Form::model($data, [ 'method' => 'PATCH', 'route' => [$route, $id], 'class' => 'form-horizontal', 'id'=>'userForm', 'enctype'=>'multipart/form-data' ]) !!} @else {!! Form::open(array('route' => $route,'method'=>'POST', 'enctype'=>'multipart/form-data','id'=>'userForm')) !!} @endif
{!! Form::label('first_name', 'First Name *:',array('class'=>'col-md-3 col-form-label','for'=>'first_name'),false) !!}
{!! Form::text('first_name',null,['class'=>'form-control','placeholder'=>'Enter first name','id'=>'first_name']) !!} @if ($errors->has('first_name')) {{ $errors->first('first_name') }} @endif
{!! Form::label('last_name', 'Last Name *:',array('class'=>'col-md-3 col-form-label','for'=>'last_name'),false) !!}
{!! Form::text('last_name',null,['class'=>'form-control','placeholder'=>'Enter last name','id'=>'last_name']) !!} @if ($errors->has('last_name')) {{ $errors->first('last_name') }} @endif
{!! Form::label('email', 'Email *:',array('class'=>'col-md-3 col-form-label','for'=>'email'),false) !!}
{!! Form::text('email',null,['class'=>'form-control','placeholder'=>'Enter email','id'=>'email']) !!} @if ($errors->has('email')) {{ $errors->first('email') }} @endif
{!! Form::label('phone', 'Phone *:',array('class'=>'col-md-3 col-form-label','for'=>'phone'),false) !!}
{!! Form::text('phone',null,['class'=>'form-control','placeholder'=>'Enter phone no','id'=>'phone']) !!} @if ($errors->has('phone')) {{ $errors->first('phone') }} @endif
{!! Form::label('avatar', 'Avatar:',array('class'=>'col-md-3 col-form-label','for'=>'type'),false) !!}
Note: The image must be a file of type: jpeg, png, jpg.
@if($data->avatar) @endif
{!! Form::label('status', 'Status *:',array('class'=>'col-md-3 col-form-label','for'=>'status'),false) !!} @php($sta = (isset($data->status) && $data->status==1)?'checked':'') @php($std = (isset($data->status) && $data->status!=1)?'checked':'') @php($default_chk = (empty($sta) && empty($std))?'checked':'')
{!! Form::close() !!}
@php($billing_address =[]) @php($cities = []) @if($id) @php($billing_address = \App\Helpers\Helper::getUserAddress($id,1)) @if($billing_address && isset($billing_address->state_id)) @php($cities = \App\Helpers\Helper::City($billing_address->state_id)) @endif {!! Form::model($billing_address, [ 'method' => 'PATCH', 'route' => [$route, $id], 'class' => 'form-horizontal', 'id'=>'userBillingForm', 'enctype'=>'multipart/form-data' ]) !!} @else {!! Form::open(array('route' => $route,'method'=>'POST', 'enctype'=>'multipart/form-data','id'=>'userBillingForm')) !!} @endif
{!! Form::label('name', 'Name *:',array('class'=>'col-md-3 col-form-label','for'=>'name'),false) !!}
{!! Form::text('name',null,['class'=>'form-control','placeholder'=>'Enter name']) !!} @if ($errors->has('name')) {{ $errors->first('name') }} @endif
{!! Form::label('phone', 'Phone *:',array('class'=>'col-md-3 col-form-label','for'=>'Phone'),false) !!}
{!! Form::text('phone',null,['class'=>'form-control','placeholder'=>'Enter phone']) !!} @if ($errors->has('phone')) {{ $errors->first('phone') }} @endif
{!! Form::label('address', 'Address *:',array('class'=>'col-md-3 col-form-label','for'=>'address'),false) !!}
{!! Form::text('address',null,['class'=>'form-control','placeholder'=>'Enter address',]) !!} @if ($errors->has('address')) {{ $errors->first('address') }} @endif
{!! Form::label('street', 'Street *:',array('class'=>'col-md-3 col-form-label','for'=>'street'),false) !!}
{!! Form::text('street',null,['class'=>'form-control','placeholder'=>'Enter street']) !!} @if ($errors->has('street')) {{ $errors->first('street') }} @endif
{!! Form::label('landmark', 'Landmark *:',array('class'=>'col-md-3 col-form-label','for'=>'landmark'),false) !!}
{!! Form::text('landmark',null,['class'=>'form-control','placeholder'=>'Enter landmark']) !!} @if ($errors->has('landmark')) {{ $errors->first('landmark') }} @endif
{!! Form::label('pincode', 'Zip code *:',array('class'=>'col-md-3 col-form-label','for'=>'pincode'),false) !!}
{!! Form::text('pincode',null,['class'=>'form-control','placeholder'=>'Enter pincode']) !!} @if ($errors->has('pincode')) {{ $errors->first('pincode') }} @endif
{!! Form::label('country_id', 'Country *:',array('class'=>'col-md-3 col-form-label','for'=>'country_id'),false) !!}
{!! Form::select('country_id', ['101'=>'India'], 101, ['class' => 'form-control country','id'=>'billing_country_id']) !!}
{!! Form::label('state_id', 'State *:',array('class'=>'col-md-3 col-form-label','for'=>'state_id'),false) !!} {{-- --}}
{!! Form::select('state_id', $StateProvience, null, ['class' => 'form-control state select2','id'=>'billing_state_id','data-add-type'=>'billing','placeholder'=>'Select state']) !!}
{!! Form::label('city_id', 'City *:',array('class'=>'col-md-3 col-form-label','for'=>'city_id'),false) !!} {{----}}
{!! Form::select('city_id', $cities, null, ['class' => 'form-control city select2','id'=>'billing_city_id','data-add-type'=>'billing','placeholder'=>'Select city']) !!}
{!! Form::close() !!}
@php($shipping_address = []) @php($scities =[]) @if($id) @php($shipping_address = \App\Helpers\Helper::getUserAddress($id,2)) @if($shipping_address && isset($shipping_address->state_id)) @php($scities = \App\Helpers\Helper::City($shipping_address->state_id)) @endif {!! Form::model($shipping_address, [ 'method' => 'PATCH', 'route' => [$route, $id], 'class' => 'form-horizontal', 'id'=>'userShippingForm', 'enctype'=>'multipart/form-data' ]) !!} @else {!! Form::open(array('route' => $route,'method'=>'POST', 'enctype'=>'multipart/form-data','id'=>'userShippingForm')) !!} @endif
{!! Form::label('name', 'Name *:',array('class'=>'col-md-3 col-form-label','for'=>'name'),false) !!}
{!! Form::text('name',null,['class'=>'form-control','placeholder'=>'Enter name']) !!} @if ($errors->has('name')) {{ $errors->first('name') }} @endif
{!! Form::label('phone', 'Phone *:',array('class'=>'col-md-3 col-form-label','for'=>'Phone'),false) !!}
{!! Form::text('phone',null,['class'=>'form-control','placeholder'=>'Enter phone']) !!} @if ($errors->has('phone')) {{ $errors->first('phone') }} @endif
{!! Form::label('address', 'Address *:',array('class'=>'col-md-3 col-form-label','for'=>'address'),false) !!}
{!! Form::text('address',null,['class'=>'form-control','placeholder'=>'Enter address',]) !!} @if ($errors->has('address')) {{ $errors->first('address') }} @endif
{!! Form::label('street', 'Street *:',array('class'=>'col-md-3 col-form-label','for'=>'street'),false) !!}
{!! Form::text('street',null,['class'=>'form-control','placeholder'=>'Enter street']) !!} @if ($errors->has('street')) {{ $errors->first('street') }} @endif
{!! Form::label('landmark', 'Landmark *:',array('class'=>'col-md-3 col-form-label','for'=>'landmark'),false) !!}
{!! Form::text('landmark',null,['class'=>'form-control','placeholder'=>'Enter landmark']) !!} @if ($errors->has('landmark')) {{ $errors->first('landmark') }} @endif
{!! Form::label('pincode', 'Zip code *:',array('class'=>'col-md-3 col-form-label','for'=>'pincode'),false) !!}
{!! Form::text('pincode',null,['class'=>'form-control','placeholder'=>'Enter pincode']) !!} @if ($errors->has('pincode')) {{ $errors->first('pincode') }} @endif
{!! Form::label('country_id', 'Country *:',array('class'=>'col-md-3 col-form-label','for'=>'country_id'),false) !!}
{!! Form::select('country_id', ['101'=>'India'], 101, ['class' => 'form-control country','id'=>'billing_country_id']) !!}
{!! Form::label('state_id', 'State *:',array('class'=>'col-md-3 col-form-label','for'=>'state_id'),false) !!} {{-- --}}
{!! Form::select('state_id', $StateProvience, null, ['class' => 'form-control state select2','id'=>'shipping_state_id','data-add-type'=>'shipping','placeholder'=>'Select state']) !!}
{!! Form::label('city_id', 'City *:',array('class'=>'col-md-3 col-form-label','for'=>'city_id'),false) !!} {{----}}
{!! Form::select('city_id', $scities, null, ['class' => 'form-control city select2','id'=>'shipping_city_id','data-add-type'=>'shipping','placeholder'=>'Select city']) !!}
{!! Form::close() !!}
@endsection @section('scripts') @endsection