In blade template i use last() method to find last iteration of foreach loop:
@foreach ($colors as $k => $v) id !!} {{ $colors-
@foreach ($colors as $v) id !!} {!!($v == end($colors)) ? 'selected="selected"' : '' !!} > {!! $v->name !!} @endforeach
or
@foreach ($colors as $v) id !!} {{($v == end($colors)) ? 'selected="selected"' : '' }} > {!! $v->name !!} @endforeach