Файл: app/Http/Requests/API/UpdateWebsiteRequest.php
Строк: 20
<?php
namespace AppHttpRequestsAPI;
use AppHttpRequestsUpdateWebsiteRequest as BaseUpdateWebsiteRequest;
use IlluminateHttpExceptionsHttpResponseException;
use IlluminateContractsValidationValidator;
class UpdateWebsiteRequest extends BaseUpdateWebsiteRequest
{
/**
* Handle a failed validation attempt.
*
* @param Validator $validator
*/
protected function failedValidation(Validator $validator)
{
throw new HttpResponseException(
response()->json([
'message' => $validator->errors(),
'status' => 422
], 422));
}
}