ValidationException.php 420 B

12345678910111213141516171819
  1. <?php
  2. namespace App\Exceptions;
  3. use JetBrains\PhpStorm\Internal\LanguageLevelTypeAware;
  4. class ValidationException extends \Exception
  5. {
  6. public function __construct(string $message = "", int $code = 0, ?Throwable $previous = null, protected array $errors = [])
  7. {
  8. parent::__construct($message, $code, $previous);
  9. }
  10. public function getErrors(): array
  11. {
  12. return $this->errors;
  13. }
  14. }