コード例 #1
0
 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Closure $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     return $this->auth->onceBasic() ? $this->jsonRespond->setStatusCode(401)->respondWithError('Invalid credentials') : $next($request);
 }
コード例 #2
0
 public function response(array $errors)
 {
     return $this->jsonRespond->setStatusCode(422)->respondValidatorError($errors);
 }