Answers for "for each iteration laravel"

PHP
0

for each loop syntax in laravel

@foreach ($users as $user)
    @if ($loop->first)
        This is the first iteration.
    @endif

    @if ($loop->last)
        This is the last iteration.
    @endif

    <p>This is user {{ $user->id }}</p>
@endforeach
Posted by: Guest on November-18-2020
1

foreach loop laravel

foreach($data as $key => $value)
{
	dd($value);
}
Posted by: Guest on March-18-2021

Browse Popular Code Answers by Language