Just banging my head on something very simple. I'm doing POST request with application/json RAW body data in Postman. I'm unable to get this JSON body data in Laravel.
Using Laravel 5.8 I should be seeing data in $request->getContent(), but it's empty.
Disabled CSRF, disabled every Middleware without success.
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class BaseController extends Controller
{
public function apiRoot(Request $request)
{
var_dump($request->getContent());
exit;
}
}
As you can see I'm trying to get POST from api root directory. Just tested with an nested directory, and this does contain POST body. So the issue is only when trying to get body from root of /api/.
Because of migration from a non-laravel to Laravel app I need to have POST with body in API root.