{{-- Owner-only subscription expiry warning. Single source of truth is Restaurant::isSubscriptionExpired() / subscriptionAlertTier() — see app/Models/Restaurant.php. Included once from layouts/admin.blade.php so it can never appear twice on the same screen. --}} @php $__subRestaurant = auth()->check() && auth()->user()->isRestaurantAdmin() ? auth()->user()->restaurant : null; $__subTierData = $__subRestaurant ? $__subRestaurant->subscriptionAlertTier() : null; @endphp @if($__subRestaurant && $__subRestaurant->isSubscriptionExpired())
Subscription expired on {{ \Carbon\Carbon::parse($__subRestaurant->subscription_end_date)->format('d M Y') }}. Renew now to avoid interruption.
Renew Now
@elseif($__subTierData) @php $__subKey = 'mk_sub_alert_' . $__subRestaurant->id . '_' . $__subTierData['days'] . '_' . $__subTierData['tier']; $__subLabel = match($__subTierData['tier']) { 'urgent' => 'Urgent', 'strong' => 'Renew soon', default => 'Heads up', }; @endphp
{{ $__subLabel }}: Your MenuKosh subscription expires in {{ $__subTierData['days'] }} day{{ $__subTierData['days'] === 1 ? '' : 's' }} on {{ $__subTierData['date'] }}. Renew your plan to avoid interruption.
Renew / View Plans
@endif