File "ValidationException.php"
Full Path: /home/fundopuh/trader.fxex.org/vendor/maatwebsite/excel/src/Validators/ValidationException.php
File size: 870 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace Maatwebsite\Excel\Validators;
use Illuminate\Validation\ValidationException as IlluminateValidationException;
class ValidationException extends IlluminateValidationException
{
/**
* @var Failure[]
*/
protected $failures;
/**
* @param IlluminateValidationException $previous
* @param array $failures
*/
public function __construct(IlluminateValidationException $previous, array $failures)
{
parent::__construct($previous->validator, $previous->response, $previous->errorBag);
$this->failures = $failures;
}
/**
* @return string[]
*/
public function errors(): array
{
return collect($this->failures)->map->toArray()->all();
}
/**
* @return array
*/
public function failures(): array
{
return $this->failures;
}
}