mercredi 19 octobre 2016

How can I execute multiple methods at once in a laravel controller

I have a dashboard page where I want to display multiple functionalities like displaying a form, showing a list of articles from database.

But, since routes can allow only one method to run at a time for each route, how can I achieve it?

I want to do something like this

Route::get('/dashboard','Dashboard@index');
Route::get('/dashboard','Dashboard@showArticles');
Route::get('/dashboard','Dashboard@showUsersList');

I know this doesn't work, but what is the alternative? Since I want to do all this on the same page.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire