@extends('voyager::master') @section('page_title', "Winners Report") @section('page_header')

{{-- --}} Winners Report

@stop @section('content')
@include('voyager::alerts')
@foreach ($dates as $date)

{{ $date->insert_date }}

@foreach ($gifts as $gift) @endforeach @foreach ($cities as $city) @foreach ($data->unique('gift') as $gift) @php $query = $data ->where('insert_date', $date->insert_date) ->where('gift', $gift->gift) ->where('city', $city->city); // ->where([ // 'insert_date' => $date->insert_date, // 'gift' => $gift->gift, // 'city' => $city->city, // ]); // dump($query); $winners = $query->count() > 0 ? $query->first()->winners : 0; @endphp @endforeach @endforeach
Date Location{{ $gift->gift }}
{{ $date->insert_date }} {{ $city->city }}{{ $winners }}
@endforeach
@stop @section('css') @stop @section('javascript') @stop