code: public function handle($request, Closure $next, $authorizer)
      {
          $authorizer = $this->container->getAuthorizerByName($authorizer);
          $record = $this->route->getResource();
  
          if ($field = $this->route->getRelationshipName()) {
              $this->authorizeRelationship(
                  $authorizer,
                  $request,
                  $record,
                  $field
              );
          } else if ($record) {
              $this->authorizeResource($authorizer, $request, $record);
          } else {
              $this->authorize($authorizer, $request, $this->route->getType());
          }
  
          return $next($request);
      }
docs: Handle the request.
  
  @param Request $request
  @param Closure $next
  @param string $authorizer
  @return mixed
  @throws AuthorizationException
  @throws AuthenticationException