@extends('customerDashboard.layout') @section('content')

Available Promotions

discription
@foreach($promotions as $key1 => $promotion)
@if($promotion->is_percentage == 0) LKR {{ number_format($promotion->discount, 0, '.', ',') }} @endif
@if($promotion->is_percentage) {{ number_format($promotion->discount, 0, '.', ',') }} % @endif
@foreach ($promotion->coupons as $key => $code)
@endforeach
{{ $promotion->name }}
{{-- for applicable product --}}
@php $applicable_products = $promotion->applicable_products; $data = json_decode($applicable_products); $Products = App\Models\InsuranceTypes::whereIn('id', $data)->get(); @endphp
    @php foreach ($Products as $Product) { echo("
  • ". $Product->title . "
  • "); } @endphp
{{-- end of applicable product --}}
Valid until {{ $promotion->end_date }}
@endforeach
@endsection