Laravel loop with counter
@foreach($rows as $row)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $row->item1}}</td>
<td>{{ $row->item2}}</td>
</tr>
@endforeach
Laravel loop with counter
@foreach($rows as $row)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ $row->item1}}</td>
<td>{{ $row->item2}}</td>
</tr>
@endforeach
laravel blade get array count in Blade
You can use the php count function to count the length of an array.
http://php.net/manual/en/function.count.php
EXAMPLE:
@if (count($array) > 0)
{{-- expr --}}
@endif
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us