Laravel problem with @foreach loop in blade view

try this

@foreach($filenames as $key => $filename )
    <tr>
        <td>{{ $filename }}</td>
        <td>{{ $filesizes[$key] ?? "" }}</td>
    </tr>
@endforeach

as both $filenames and $filesizes same index have same value so you can use index to get value from $filesizes[index]

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top