*/ protected $dontFlash = [ 'current_password', 'password', 'password_confirmation', ]; /** * Register the exception handling callbacks for the application. */ public function register(): void { $this->reportable(function (Throwable $e) { return match (get_class($e)) { ValidationException::class => false, UploadFailedException::class => false, default => true, }; }); $this->renderable(fn(ValidationException $e) => $this->unprocesableEtity($e->getErrors(), message: $e->getMessage())); $this->renderable(fn(ValidationException $e) => $this->badRequest($e->getMessage())); } }