@extends('admin.layouts.master') @section('title') coupons @endsection @section('css') @endsection @section('content')
Add new
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@foreach($data as $row) @include('admin.coupons.deleted') @endforeach
code type code customer Status discount value discount type max used times used Action
{{ $row->code }} {{ $row->type_code() }} {{ $row->customer_id ? $row->customer->name() : 'no customer' }}
status == '1' ? 'checked' : ''}} onchange="toggleStatus({{$row->id}}, this.checked ? '1' : '0')">
{{ $row->discount_value }} {{ $row->discount_type }} {{ $row->max_used }} {{ $row->times_used }}
{{$data->links()}}
@endsection @section('js') @endsection