@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}}
@php($foods = \App\Models\Food::withoutGlobalScope(\App\Scopes\RestaurantScope::class)->where('restaurant_id', $restaurant->id)->latest()->paginate(25))
@php($foods = \App\Models\Food::withoutGlobalScope(\App\Scopes\RestaurantScope::class)->where('restaurant_id', $restaurant->id)->latest()->paginate(25)) @foreach($foods as $key=>$food) @endforeach
{{ translate('messages.sl') }} {{translate('messages.name')}} {{translate('messages.category')}} {{translate('messages.price')}} {{translate('messages.status')}} {{translate('messages.action')}}
{{$key+1}} {{$food->name}} image
{{Str::limit($food['name'],20,'...')}}
{{Str::limit($food->category,20,'...')}}
@php($price = \App\CentralLogics\Helpers::format_currency($food['price'])) {{$price}}
@csrf @method('delete')
{!! $foods->links() !!}
@endsection @push('script_2') @endpush