Postman GET request not supported on a POST request

  http, laravel, php, postman, request

I have a simple route in Laravel 8 to return some request data. But when I send the request in Postman with POST selected, I get an error of "The GET method is not supported for this route." Keep in mind, I have POST selected in Postman, not GET.

Here is the route:

Route::post('post-route', '[email protected]');

Here is is the function being called in UserController:

public function postFunction(Request $request) {
    return [
        'id1' => $request->id1,
        'id2' => $request->id2,
    ];
}

In Postman I am passing the data as json:

{
    'id1': 1234,
    'id2': 4321
}

I am simply trying to make sure I am passing the correct data in the request but I am getting this error. Why is it trying to hit a GET request?

Source: Laravel

Leave a Reply