In Blade's foreach you can use $loop variable even in two-level loop to reach parent variable.
1@foreach ($users as $user)2 @foreach ($user->posts as $post)3 @if ($loop->parent->first)4 This is first iteration of the parent loop.5 @endif6 @endforeach7@endforeach