title: Multiple @foreach in views - Laravel
body: <p>I need to output various <code>@foreach</code> loops throughout my blade template, however they all target the same table in my database, just fetching different fields. As an example, I am using @yield in my main layout and @section in the views for title/descriptions tags etc etc:</p>
  
  <pre><code>@section('title')
  
  @foreach($store_listings as $fetch)
  Website stores - {{ $fetch-&gt;city }}, {{ $fetch-&gt;country }}
  @endforeach
  
  @stop
  
  @section('description')
  
  @foreach($store_listings as $fetch)
  List of Stores in {{ $fetch-&gt;city }}, {{ $fetch-&gt;country }}.
  @endforeach
  
  @stop
  </code></pre>
  
  <p>Then in layout.main:</p>
  
  <pre><code>&lt;title&gt;@yield('title')&lt;/title&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;meta name="description" content="@yield('description')" /&gt;
  </code></pre>
  
  <p>This repeated @foreach loops are present in other sections of my views on other pages. I try to work by the DRY method. What are the suggestion here to save me entering multiple foreach loops when all I wish to do is call some variables? I don't want to have my controller to handle this business either. </p>
  
  <p>Thanks</p>