mardi 24 mai 2016

Different route with different parameters to same method in laravel

I have 2 routes one for get and one for post method. For get route, i have 2 extra parameters in route, so when post method is called it says error some parameter is missing

Routes.php file,

Route::get('/abc/{one}/{two}','MainController@someFunction');
Route::post('/abc','MainController@someFunction');

Controller file,

someFunction(Request $req, $first,$second){

problem is here when i use post method as there are no parameters 
and this function is expecting $first and $second parameters

}



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1WLZEfb
via IFTTT

Aucun commentaire:

Enregistrer un commentaire