*/ protected $dontFlash = [ 'current_password', 'password', 'password_confirmation', ]; /** * Register the exception handling callbacks for the application. */ public function register(): void { $this->reportable(function (Throwable $e) { // }); $this->renderable(function (InvalidParameterInterface $exception, Request $request) { return response()->json([ 'error' => $exception->getMessage(), ], $exception->getCode()); }); } }