handle multiple post requests to same url Laravel 5
I have two forms on a page both submits the data via POST method . I want to handle both requests on the same url i.e /home and use different controllers and methods for both forms. Below are the two routes. Route::post('home' ,'FacebookControllers\PostsController@save'); Route::post('home' , 'FacebookControllers\MessageController@storeMessage'); In PostsController@save I am checking if(isset($_POST['submitPost']) && $_SERVER['REQUEST_METHOD']=='POST'){ //do something } and in MessageController@storeMessage I am doing the same for other form if(isset($_POST['sendMessage']) && $_SERVER['REQUEST