User Registration Step 2 Logic Class

Update Company Service Class
Create Documents Service Class
Create File Service Class
Base64 File Convert Service Class
File Upload Storage Service Class
This commit is contained in:
CheeSiong
2020-11-05 14:51:56 +08:00
parent 2bf5de8f3e
commit a2381e44a7
33 changed files with 1025 additions and 40 deletions
@@ -34,9 +34,9 @@ abstract class AbstractValidation
* @return bool
* @throws RequestValidationException
*/
public function validate(DataTransferObject $object){
$validator = $this->validator::make($this->data($object), $this->rules(), $this->messages());
public function validate(DataTransferObject $object, ?string $type = 'POST')
{
$validator = $this->validator::make($this->data($object), $this->rules($type), $this->messages());
if($validator->fails()) {
throw new RequestValidationException($validator->messages()->first());