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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -