mercredi 7 février 2018

How to pass data from two different controller to single view in laravel5

I am new to Laravel5. There are two controllers Dashboard.php and Stats.php. I want to pass variables from both controllers to my single view DashBoard.blade.php Guide me is this possible and also guide me the about the route of project.

here is my routing code:

` Route::get('/', function () { return view('welcome'); });

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

Route::get('/DashBoard', 'DashBoard@ratingdata')->name('DashBoard');

Route::get('/Stats', 'Stats@statsdata')->name('Stats'); `

It works when views are different. but i need data on single view



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire