You can pass data from laravel controller to view by using 'with' keyword
$userDetails=array('name'=>'abc','mobile'=>'768576565');
return View::make('profile')->with('userDetails', $userDetails);
you can send multiple argument by using 'with' for example
return View::make('profile')->with('userDetails', $userDetails)->with('UserPost', $UserPost);
0 Comment(s)