@extends('layouts.admin.app') @section('title', $restaurant->name . "'s" . translate('messages.Food')) @push('css_or_js') @endpush @section('content')
public
@php( $food = \App\Models\Food::withoutGlobalScope(\App\Scopes\RestaurantScope::class)->where(['restaurant_id' => $restaurant->id])->count()) @php($food = $food == null ? 0 : $food)
{{ translate('messages.all') }}{{ $food }}
public
@php( $food = \App\Models\Food::withoutGlobalScope(\App\Scopes\RestaurantScope::class)->where(['restaurant_id' => $restaurant->id, 'status' => 1])->count()) @php($food = $food == null ? 0 : $food)
{{ translate('Active_Food') }}{{ $food }}
public
@php( $food = \App\Models\Food::withoutGlobalScope(\App\Scopes\RestaurantScope::class)->where(['restaurant_id' => $restaurant->id, 'status' => 0])->count()) @php($food = $food == null ? 0 : $food)
{{ translate('Inactive_Food') }}{{ $food }}

{{ translate('messages.foods') }} {{ $foods->total() }}

{{ translate('messages.add_new_food') }}
@if ($productWiseTax) @endif @foreach ($foods as $key => $food) @php($stock_out = null) @if ($productWiseTax) @endif {{-- Stock Update Modal --}}
{{ translate('messages.sl') }} {{ translate('messages.name') }} {{ translate('messages.category') }} {{ translate('messages.price') }} {{ translate('messages.Vat/Tax') }}{{ translate('messages.status') }} {{ translate('messages.action') }}
{{ $key + $foods->firstItem() }} {{ $food->name }} image
{{ Str::limit($food['name'], 20, '...') }} @if ($food->stock_type != 'unlimited' && $food->item_stock <= 0) @php($stock_out = true) {{ translate('Out Of Stock') }} public/img @else @if ($stock_out) {{-- {{ translate('Out Of Stock') }} --}} public/img @endif @endif
{{ Str::limit( ($food?->category?->parent ? $food?->category?->parent?->name : $food?->category?->name) ?? translate('messages.uncategorize'), 20, '...', ) }}
@php($price = \App\CentralLogics\Helpers::format_currency($food['price'])) {{ $price }}
@forelse ($food?->taxVats?->pluck('tax.name', 'tax.tax_rate')->toArray() as $key => $tax) {{ $tax }} : ({{ $key }}%)
@empty {{ translate('messages.N/A') }} @endforelse
@if ($stock_out) @endif
@csrf @method('delete')