Code and Discount Amount:

Code Validity:

Applied Restrictions:

{{$discount->discount_code}} - {{$discount->discount_percentage}}%

@if ($discount->start_date != null && $discount->end_date != null) {{ date('d M Y', strtotime($discount->start_date)) }} - {{ date('d M Y', strtotime($discount->end_date)) }} @else Indefinite @endif

@if($discount->email == "") None @else @php $emails = $discount->email; $emailsArray = json_decode($emails); if (is_array($emailsArray)) { $formattedEmails = implode(', ', $emailsArray); } else { $formattedEmails = ''; // Set a default value or handle accordingly } @endphp @if ($formattedEmails != '') Only @foreach($emailsArray as $email) @if (!Str::contains($email, '@')) {{ "@". $email }} @else {{ $email }} @endif @if (!$loop->last), @endif @endforeach @endif @endif