@extends('layouts.admin.app') @section('title',translate('Restaurant_List')) @push('css_or_js') @endpush @section('content')
@if(!isset(auth('admin')->user()->zone_id))
@endif

{{$restaurants->total()}}

{{translate('messages.total_restaurants')}} resturant
@php($active_restaurants = \App\Models\Restaurant::where(['status'=>1]) ->whereHas('vendor', function($q){ $q->where('status',1); }) ->when( isset($zone) && ($zone->id), function ($query) use ($zone) { return $query->where('zone_id', $zone->id); }) ->type($type)->RestaurantModel($typ) ->count()) @php($active_restaurants = isset($active_restaurants) ? $active_restaurants : 0)

{{$active_restaurants}}

{{translate('messages.active_restaurants')}} resturant
@php($inactive_restaurants = \App\Models\Restaurant::where(['status'=>0]) ->whereHas('vendor', function($q){ $q->where('status',1); }) ->when( isset($zone) && ($zone->id), function ($query) use ($zone) { return $query->where('zone_id', $zone->id); }) ->type($type)->RestaurantModel($typ) ->count()) @php($inactive_restaurants = isset($inactive_restaurants) ? $inactive_restaurants : 0)

{{$inactive_restaurants}}

{{translate('messages.inactive_restaurants')}} resturant
@php($data = \App\Models\Restaurant::where('created_at', '>=', now()->subDays(30)->toDateTimeString()) ->whereHas('vendor', function($q){ $q->where('status',1); }) ->when( isset($zone) && ($zone->id), function ($query) use ($zone) { return $query->where('zone_id', $zone->id); }) ->type($type)->RestaurantModel($typ) ->count())

{{$data}}

{{translate('messages.newly_joined_restaurants')}} resturant

{{translate('messages.restaurants_list')}}

@foreach($restaurants as $key=>$dm) @endforeach
{{translate('messages.sl')}} {{translate('messages.restaurant_info')}} {{translate('messages.owner_info')}} {{translate('messages.zone')}} {{translate('messages.cuisine')}} {{translate('messages.route_account')}} {{translate('messages.status')}} {{translate('messages.action')}}
{{$key+$restaurants->firstItem()}}
{{Str::limit($dm->name,20,'...')}}
@if ($dm->reviews_count) @php($reviews_count = $dm->reviews_count) @php($reviews = 1) @else @php($reviews = 0) @php($reviews_count = 1) @endif {{ round($dm->reviews_sum_rating /$reviews_count,1) }}
{{$dm->vendor->f_name.' '.$dm->vendor->l_name}} {{$dm['phone']}} {{$dm->zone?$dm->zone->name:translate('messages.zone_deleted')}} @if ($dm->cuisine)
@forelse($dm->cuisine as $key => $c) {{$c->name}}{{ $key == 3 ? ' ....' : (!$loop->last ? ',' : '.')}} @break($key == 3) @empty {{ translate('Cuisine_not_found') }} @endforelse
@endif
@include('admin-views.partials._linked_account_badge', [ 'account' => $dm->linkedAccount, 'type' => 'restaurant', 'id' => $dm->id ]) @if(isset($dm->vendor->status)) @if($dm->vendor->status) @else {{translate('messages.denied')}} @endif @else {{translate('messages.not_approved')}} @endif
@if(count($restaurants) === 0)
public
{{translate('no_data_found')}}
@endif
{!! $restaurants->appends(request()->all())->links() !!}
@endsection @push('script_2') @endpush