From the documentation the way we pass data from controller to view in laravel is like
return view('someview')->with('key', $data);
So I try to pass my query results to view by
$data = DB::table('user')->where('confirmation_status',1)->get();
return view('admin.presidentConfirmed')->with('data',$data);
But at the presidentConfirmed view, there's no data in it. So I tried to use {{ Session::all() }}
to see if there's anything in the session.
Nothing...
So I tried passing just plain text through with
return view('admin.presidentConfirmed')->with('test','value');
Still nothing...
It's seems to only happen to only this specific view. Since I use ->with()
with many other views without any problem.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire