mardi 21 janvier 2020

while passing parameter in retrun view from controller to blade getting error in foreach

Getting Error In Laravel foreach loop.

Controller is

$userprojectObjs = works::getProjects();

return view('admin.users.self_assign',['userprojectObjs'=>json_encode($userprojectObjs)]);

Blade is

@foreach ($userprojectObjs  as $key=>  $userprojectObjs )
                               <tr>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                               <tr>
@endforeach

It showing Invalid argument supplied for foreach() ;



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire