<?php namespace App\Exceptions; use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware; class ValidationException extends \Exception { public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null, protected array $errors = []) { parent::__construct($message, $code, $previous); } public function getErrors(): array { return $this->errors; } }