Issue
I'm new to laraval. I got this POST route but if someone try the address on the browser it become a GET route and laravel throw a error. Is there a way to throw a 404 page for a GET request on POST route.
Route::post('/step2Validate', 'StepController@step2Validate');
If this route is access as GET "The GET method is not supported for this route. Supported methods: POST." error is given.
Solution
Try this:
Route::get('/step2Validate', function() {
abort(404);
}
);
Answered By - Dimitri Mostrey Answer Checked By - Clifford M. (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.