I have a POST
route in my api.php
file, and it is like this:
Route::group(
['namespace' => 'api'], function () {
Route::post('parent/signup', 'ParentController@signUp');
}
);
And I am trying to access this url in postman
as this is an api
route. But when I send request to this route
, this exception
occurs:
MethodNotAllowedHttpException in RouteCollection.php line 218:
I am definitely sending a post request as shown in the shot below:
I ran php artisan route:list
and this route is a POST one.
| POST | api\/parent\/signup | | App\\Http\\Controllers\\api\\ParentController@signUp
What am I doing wrong here? Any help?
public
in your url? Standard Laravel applications are served from public, but you don't need to add it to the url. Could you tryexample.com/api/parent/signup
? – JiFussignUp
. As shown. – Saani