Using Laravel 5.4 have this route in web.php
Route::post('foo/bar', function () {
return 'Hello World';
});
but when I visit the http://localhost:8000/foo/bar URL in browser I have this error:
MethodNotAllowedHttpException in RouteCollection.php line 251: in RouteCollection.php line 251 at RouteCollection->methodNotAllowed(array('POST')) in RouteCollection.php line 238 at RouteCollection->getRouteForMethods(object(Request), array('POST')) in RouteCollection.php line 176 at RouteCollection->match(object(Request)) in Router.php line 533 ...
I want to test a POST route method via the browser.