mercredi 20 février 2019

Laravel two forms to siubmitting to the same controller and redirecting back

I have a UsersController which updates user properties.

    Route::post('users/{userId}', 'App\UsersController@updateUser')->name('user.id.post');

If I submit to that route from two different views, is there a way to know where the submission came from and to redirect to that location upon successful updating?

Is there access to the referring route in Laravel to determine where the submission came from so I can send the redirect back to the source dynamically without having to hide some kind of input within the form to tell me where to submit back to?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire