Reputation: 555
I have these two routes on routes.php
Route::post('view', 'LivefeedController@liveversion');
//test new view.
Route::post('testview', 'TestController@testversion');
What I am trying to do is call both controllers and methods using 1 route. So if someone goes to /view both of liveversion and testversion are called. What would be the best way to do this please?
Upvotes: 0
Views: 2264
Reputation: 3971
You might Redirect from the first controller to second after finishing its job, for example in LivefeedController liveversion method you can redirect like that:
return Redirect::action('TestController@testversion');
Here is the documentation on Laravel Redirects, though as it was pointed out in comments - thats not a good thing to do (redirect from one POST action to another POST action).
Upvotes: 2