title: How to fetch multiple groupby in laravel blade?
body: <p>Hello i have a result like this <a href="https://i.stack.imgur.com/Wo3mT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wo3mT.png" alt="laravel array result from groupby(['date', 'project_site_id'])" /></a> it is group by date and id. Now my problem is how can i fetch this kind of array in laravel blade i try my best but no luck. i try foreach but it is giving me wrong result? Below is my code</p>
  <pre><code>$current_date = Carbon::parse(date('Y-m-d'));
  
  $data = EmployeeActivities::where('date', '&gt;=', $current_date-&gt;startOfWeek()-&gt;format('Y-m-d'))-&gt;where('date', '&lt;=', $current_date-&gt;endOfWeek()-&gt;format('Y-m-d'))-&gt;get()-&gt;groupBy(['date', 'project_site_id']);
  
  foreach($data as $key =&gt; $value){
          //echo $key;
          foreach($value as $key_nested =&gt; $value1){
              foreach($value1 as $key_nested1){
                  echo $key_nested1.'&lt;/br&gt;&lt;/br&gt;';
              }
          }
  
   }
  </code></pre>