this is code from laravel API public/index.php file.
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
When sending a request it returns without any data and with status code: 200 just from $kernel->handle.
When I print dd('111'); before
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
it is shown in request's reponse, but when I print after $response = $kernel->handle(), the request has no response.
I had exactly the same issue - empty response with 200 http status. Adding breakpoints showed that it couldn't get past the $kernel->handle() call in the index.php.
Turns out it was caused by whitespace in my .env file
MAIL_FROM_NAME=Test Instance
should have been enclosed in quote marks
MAIL_FROM_NAME="Test Instance"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With