Answers for "laravel first item in loop"

PHP
2

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
Posted by: Guest on February-02-2021

Code answers related to "laravel first item in loop"

Browse Popular Code Answers by Language