@extends('layouts.admin.app') @section('title', translate('Food_List')) @push('css_or_js') @endpush @section('content')
@php($filtered = request()->has('types') || request()->has('min_price') || request()->has('max_price') || request()->has('status') || request()->has('category_ids'))
@if ($productWiseTax) @endif @foreach ($foods as $key => $food) @php( $stock_out = null) @if ($productWiseTax) @endif
{{ translate('messages.sl') }} {{ translate('messages.name') }} {{ translate('messages.category') }} {{ translate('messages.restaurant') }} {{ translate('messages.price') }}{{ translate('messages.Vat/Tax') }}{{ translate('messages.Stock') }} {{ translate('messages.status') }} {{ translate('messages.action') }}
{{ $key + $foods->firstItem() }} {{ $food->name }} image
{{ ucwords(Str::limit($food['name'], 20, '...')) }}
@if ($food->stock_type != 'unlimited' && $food->item_stock <= 0 ) @php( $stock_out = true) {{ translate('Out Of Stock') }} @else @if($stock_out) public/img @endif @endif
{{ Str::limit(($food?->category?->parent ? $food?->category?->parent?->name : $food?->category?->name ) ?? translate('messages.uncategorize') , 20, '...') }} @if ($food->restaurant) {{ Str::limit($food->restaurant->name, 20, '...') }} @else {{ Str::limit( translate('messages.Restaurant_deleted!'), 20, '...') }} @endif {{ \App\CentralLogics\Helpers::format_currency($food['price']) }} @forelse ($food?->taxVats?->pluck('tax.name', 'tax.tax_rate')->toArray() as $key => $tax) {{ $tax }} : ({{ $key }}%)
@empty {{ translate('messages.N/A') }} @endforelse
{{ $food->stock_type == 'unlimited' ? translate('messages.unlimited_Stock') :$food->item_stock }} @if($food->stock_type == 'daily') @endif
@if($stock_out) @endif
@csrf @method('delete')