Answer the question
In order to leave comments, you need to log in
How to process different POSTs on the same URL in Laravel 5?
Good afternoon!
As in Laravel 5, handle different POST requests on the same page, for example:
Route::post('clients/registration', '[email protected]');
Route::post('clients/registration', '[email protected]');
Route::post('clients/registration', '[email protected]');
Well, for example, in the form we will send the name of the function to be called in a hidden field. Or is it done in some other way?
Answer the question
In order to leave comments, you need to log in
Anonymous functions in the route can help, or pass it to the controller and resolve it there.
Anonymous Functions
Route::post('clients/registration', function(){
If ($_POST[PARAN]){
Your controller from a hidden field ;}});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question