Closed M0einRahmani closed 1 month ago
"I used (new Ziggy())->jsonSerialize() in Exceptions\Handler.php in my Laravel + InertiaJS project. When an error or exception occurs, I noticed that the resolveBindings function gets stuck in an infinite loop." #
public function register(): void { $this->reportable(function (Throwable $e) { // }); $this->renderable(function (Throwable $e, Request $request) { $status = method_exists($e, 'getStatusCode') ? $e->getStatusCode() : 500; return Inertia::render('Error', [ 'ziggy' => fn() => (new Ziggy())->jsonSerialize(), // ]) ->toResponse($request) ->setStatusCode($status); }); }
Pull request: #760
"I used (new Ziggy())->jsonSerialize() in Exceptions\Handler.php in my Laravel + InertiaJS project. When an error or exception occurs, I noticed that the resolveBindings function gets stuck in an infinite loop." #
Exceptions\Handler.php
Pull request: #760