how get the first item in foreach in laravel code example
Example 1: how get the first item in foreach in laravel
@foreach($items as $item)
@if ($loop->first) First Item: @endif
<h4>{{ $item->program_name }}</h4>
@endforeach
Example 2: php blade first child @foreach
First Last child laravel blade loop