{{ $coupon->title_ar }}
{{ $coupon->title_en }}
{{ $coupon->code }}
{{ $coupon->value }}
{{ $coupon->minimum_spend ?? __('category.none') }}
{{ $coupon->usage_limit ?? __('category.none') }}
{{ $coupon->start_date ? \Carbon\Carbon::parse($coupon->start_date)->format('Y-m-d H:i') : __('category.none') }}
{{ $coupon->end_date ? \Carbon\Carbon::parse($coupon->end_date)->format('Y-m-d H:i') : __('category.none') }}
{{ $coupon->type == 'percentage' ? __('coupon.Percentage') : __('coupon.Fixed') }}
{{ $coupon->apply_type == 'dish' ? __('coupon.Dish') : __('coupon.Order') }}
{{ $coupon->is_active ? __('coupon.Active') : __('coupon.Inactive') }}
-
@forelse ($coupon->branches as $branch)
- {{ app()->getLocale() == 'en' ? $branch->name_en : $branch->name_ar }} @empty
- @lang('coupon.NoBranches') @endforelse
-
@forelse ($coupon->branches as $branch)
@php
$dishIds = json_decode($branch->pivot->dish_ids, true) ?? [];
@endphp
@if (count($dishIds))
@foreach ($dishIds as $dishId)
@php
$dish = \App\Models\Dish::find($dishId);
@endphp
@if ($dish)
- {{ app()->getLocale() == 'en' ? $dish->name_en : $dish->name_ar }} @endif @endforeach @else
- @lang('coupon.NoDishes') @endif @empty
- @lang('coupon.NoBranches') @endforelse