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