vendredi 20 mars 2020

Undefined variable: Laravel ErrorException (E_ERROR) Return view error

Following is my controller query results

$result3count=count($result3gtime);
$select3g=DB::table('crm3g');

Am trying to pass this from controller to blade. Getting the values from $select3g, but while am trying to print

 

this in blade it gives the error, Undefined variable: result3count. I tried different types of return view conditions like below but I cant get the result.

return view('admin.upload-panel.search-panel')->with (['result3count'=>$result3count],['select3g'=>$select3g]]);
return view('admin.upload-panel.search-panel',compact('result3count','select3g');
return view('admin.upload-panel.search-panel', with('result3count','$result3count','select3g','$select3g'));

What is the actual problem, I think $select3g result is an array but $result3count result is an integer



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire