NeoZeroSeer

ErrorException: Invalid argument supplied for foreach

laravel Icon

ErrorException

Invalid argument supplied for foreach()

An unhandled exception occurred on line 100
97
                </tr>
98
            </thead>
99
            <tbody>
100
                @foreach($criminals ?? '' as $criminal)
101
                    <tr>
102
                        <td><a href="{{ route('lspd-criminal.show', compact('criminal')) }}">{{ $criminal->name }}</a></td>

Solution

Using the wrong name in the blade            
Apr 10, 2021 Anyone

0 replies


Install the browser extension

Found this solution helpful? Try our extension for quick solutions to your Laravel errors.

Chrome logo Add to Chrome - It's free