@extends('layouts.app') @section('title') {{ __('messages.Restaurants') }} @endsection @section('content')
@include('inc.breadcrumb', [ 'breadcrumb_items' => [ __('messages.Home') => route('home'), __('messages.Restaurant statistics') => 'active', ], ])
{{ __("messages.Restaurant sales from completed orders") }}

{{ round($last_7_days_earnings , 2 ) }} {{ __("messages.AED") }}

{{ __("messages.In the last 7 days") }}

{{ __("messages.Duration") }} {{ $last_7_days_start_date }} - {{ date("Y-m-d") }}

{{ round($current_month_earnings , 2 ) }} {{ __("messages.AED") }}

{{ __("messages.In the current month") }}

{{ __("messages.Duration") }} {{ $start_of_month }} - {{ $end_of_month }}

{{ round($current_year_earnings , 2 ) }} {{ __("messages.AED") }}

{{ __("messages.In the current year") }}

{{ __("messages.Duration") }} {{ $start_of_year }} - {{ $end_of_year }}

{{ __("messages.Top Selling Meals") }}
@if(!count($top_5_selling_meals))

{{ __("messages.There is no data to display") }} :(

@else
@foreach ($top_5_selling_meals as $meal) @endforeach
{{ __("messages.Name") }} {{ __("messages.Number of sales") }}
Avatar
{{ $meal->product->name }}

{{ $meal->total_sold }}

@endif
{{ __("messages.Top Restaurants by Skip Earnings") }}
@if(!count($top_5_skip_earning_restaurants))

{{ __("messages.There is no data to display") }} :(

@else
    @foreach ($top_5_skip_earning_restaurants as $top_5_skip_earning_restaurant)
  • Avatar
    {{ $top_5_skip_earning_restaurant->restaurant->restaurant_info?->name ?? $top_5_skip_earning_restaurant->name }}

    {{ $top_5_skip_earning_restaurant->total_skip_earnings }} {{ __("messages.AED") }}

  • @endforeach
@endif
{{ __("messages.Top Restaurants by Number of Orders") }}
    @if(!count($top_5_restaurants_by_orders))

    {{ __("messages.There is no data to display") }} :(

    @else @foreach ($top_5_restaurants_by_orders as $top_5_restaurants_by_order)
  • Avatar
    {{ $top_5_restaurants_by_order->restaurant->restaurant_info?->name ?? $top_5_restaurants_by_order->name }}

    {{ $top_5_restaurants_by_order->total_orders }}

  • @endforeach @endif
@endsection