send data using controller in app.blade laravel 4 -
i have usercontroller
, want send data usercontroller
function app.blade.php
.
function sessionuser(){ $data['status'] = auth::user()->status; $data['id'] = auth::id(); $data['values]=db::table('user_permission)->get(); return view('app.blade', compact('data')); }
and in app.blade.php
dd($data);
try it:
function sessionuser(){ $data['status'] = auth::user()->status; $data['id'] = auth::id(); $data['values']=db::table('user_permission')->get(); return view('app')->with($data); }
or
function sessionuser(){ $status = auth::user()->status; $id = auth::id(); $values = db::table('user_permission')->get(); return view('app', compact('status','id','values')); }
then echo dd($status);
Comments
Post a Comment