Reputation: 216
I'm going crazy on this problem. I have searched for hours, but found nothing.
I have a Laravel 8 app using InertiaJs. Everything works perfectly, except for the fact there are errors logged everytime I navigate. The navigation and the app itself works without a problem. I can access and use all my routes. But when I look at my log, it's full of errors.
I am using Valet.
I have no clue where to look, so it's difficult to provide code.
Here are two examples of the errors I'm getting:
Error on ResponseJson::route()
Please release me from my suffering!
Upvotes: 0
Views: 106
Reputation: 50531
You have edited the index.php
file in public
(the front loader for the application). You have swapped the order of arguments passed to the terminate
method:
$kernel->terminate($response, $request);
That is supposed to be:
$kernel->terminate($request, $response);
First argument is the Request and the second is the Response.
Don't edit the bootstrap files.
The reason your site is "working" is because you are receiving responses when sending requests. The response is sent off before this method is called, so you wouldn't see any errors when making a request, only in the logs as the response has already been returned to the client.
Upvotes: 3