Search code examples
laravelpostroutesget

My post route doesn't work, postman thinks it is GET request


I have my resource Route, it works fine for GET, but it doesn't work for post method

Route::resource('cart', CartController::class);

I have tried clearing the cache but it didn't solve.

a screenshot from postman:

GET request:

GET request

Post request:

Post request


Solution

  • I have solved the problem, but I didn't actually know the real reason behind it.

    Maybe it is because I remove the valet link and make another one, something related to the caching although I cleared all the cache before.

    thank you all for your help