%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/o91-api/app/Exceptions/
Upload File :
Create Path :
Current File : /var/www/html/o91-api/app/Exceptions/CustomValidationException.php

<?php

namespace App\Exceptions;


class CustomValidationException extends ApiException
{
    private $validator;

    /**
     * CustomValidationException constructor.
     *
     * @param $validator
     */
    public function __construct($validator)
    {
        $this->validator = $validator;
    }

    public function render()
    {
        return $this->response()
                    ->wrongArguments([
                                         'message' => head(head(head($this->validator->errors()))),
                                         'errors'  => $this->validator->errors(),
                                     ]);
    }

}

Zerion Mini Shell 1.0