Check your logs for the 500 error cause.
What is your production environment (load balancers, HTTP to HTTPS redirection etc.) - your POST request might be redirected without preserving the original request verb?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm pretty stumped so if anyone can point me in a direction I'd really appreciate it.
Everything is working 100% correctly on my local dev machine (Mac). Now when I deploy to a production server my Post requests don't work. I am testing requests via POSTMAN.
/routes/api.php
Route::prefix('v1')->group(function () {
Route::middleware('auth:api')->group( function () {
Route::apiResource('rewards', 'API\RewardTransferController');
Route::apiResource('rewards/customers', 'API\CustomerController');
Route::get('rewards/customers/bri/{briCustomerNumber}', 'API\CustomerController@getByBriCustomerNumber')->where('briCustomerNumber', '[0-9]{7}');
Route::post('test', function()
{
return "POST SUCCESS!";
});
});
});
In the above my /rewards/customers/bri/{briCustomerNumber} route does work in dev and in production.
However, my "test" route does not work in production. The response is json response like this:
{
"message": ""
}
Additionally a POST request to "rewards" results in an empty response... no JSON format and it is 500 Internal Error.
Anyone know something I can look into to figure out why things aren't working on my production server? My GUI backend works 100% correctly but the test API with POSTMAN doesn't work on POST requests.
Please or to participate in this conversation.