@extends('layouts.admin') @section('content')
@include('include.errors') @if (isset($coupon))
@else @endif @csrf
@if (isset($coupon)) @php $title=$coupon->title @endphp @elseif(old('title')) @php $title=old('title') @endphp @else @php $title='' @endphp @endif
@if (isset($coupon)) @php $code=$coupon->code @endphp @elseif(old('code')) @php $code=old('code') @endphp @else @php $code='' @endphp @endif
@if (isset($coupon)) @php $type=$coupon->type @endphp @elseif(old('type')) @php $type=old('type') @endphp @else @php $type='' @endphp @endif
@if (isset($coupon)) @php $discount_type=$coupon->discount_type @endphp @elseif(old('discount_type')) @php $discount_type=old('discount_type') @endphp @else @php $discount_type='' @endphp @endif
@if (isset($coupon)) @php $amount=$coupon->amount @endphp @elseif(old('amount')) @php $amount=old('amount') @endphp @else @php $amount='' @endphp @endif
@if (isset($coupon)) @php $limit=$coupon->limit @endphp @elseif(old('limit')) @php $limit=old('limit') @endphp @else @php $limit='' @endphp @endif
@if (isset($coupon)) @php $start_date=date('Y-m-d',strtotime($coupon->start_date)) @endphp @elseif(old('start_date')) @php $start_date=old('start_date') @endphp @else @php $start_date='' @endphp @endif
@if (isset($coupon)) @php $end_date=date('Y-m-d',strtotime($coupon->end_date)) @endphp @elseif(old('end_date')) @php $end_date=old('end_date') @endphp @else @php $end_date='' @endphp @endif
@if (isset($coupon)) @php $description=$coupon->description @endphp @elseif(old('description')) @php $description=old('description') @endphp @else @php $description='' @endphp @endif
@if (isset($coupon)) @php $active=$coupon->active @endphp @elseif(old('active')) @php $active=old('active') @endphp @else @php $active=1 @endphp @endif
@endsection @push('scripts') @endpush