In blade template i use last() method to find last iteration of foreach loop:
@foreach ($colors as $k => $v) id !!} {{ $colors-
As for Laravel 5.3+, you can use the $loop variable
$loop->last @foreach ($colors as $k => $v) @if($loop->last) // at last loop, code here @endif @endforeach