title: Undefined variable $loop in Laravel Blade loop
body: <p>according to the latest laravel blade documentation (<a href="https://laravel.com/docs/5.3/blade" rel="nofollow">https://laravel.com/docs/5.3/blade</a> see "loops") I can "[...] use the loop variable to gain valuable information about the loop[...]".</p>
  
  <p>My laravel version is up to date but inside my foreach loop I can't access the $loop variable. It says "undefined variable $loop".</p>
  
  <p>Example:</p>
  
  <pre><code>@foreach( $values["rating"] as $rating )
  @if( $loop-&gt;iteration == 3 )
  -- do something --
  @endif
  @endforeach
  </code></pre>
  
  <p>Does anyone know a solution for this? Thank you so much!</p>