Get-and-post-requests-routing-to-same-controller-in-laravel

Hi my problem is how to get and post resquest on same controller, my routes shown error.
Deepak Sharma
Asked 12-12-2024
651

Answer (1)
Hi use same routes for both get as well as post some thing like as below in laravel 5.5 :  Route::get('/candidates', 'CandidateController@candidates')->name('candidates'); Route::post('/candidates', 'CandidateController@candidates')->name('candidates'); Fully tested and workable.
Harsh Aggrawal
Asked 07-05-2019
45 Likes
Comments
Write comment

Submit your answer