public function __construct() { parent::__construct(); validator()->extend('unique_array', function ($attributes, $values) { $array = []; foreach ($values as $key => $value) { if (in_array($value, $array)) { return false; } $array[] = $value; } return true; }); }
/** * Call the parent constructor and initialize the validator instance * * @param Factory $validator */ public function __construct(Factory $validator) { parent::__construct(); $this->validator = $validator; }
public function __construct() { parent::__construct(); $this->validateMac(); }
public function __construct() { $this->validator = app('validator'); $this->validateConvenioBb($this->validator); parent::__construct(); }