code: public function extract(Collection $resources, Closure $callback)
      {
          foreach ($resources as $resource) {
              $callback($resource, ['record' => $resource]);
          }
      }
docs: Extract a single resource.
  
  @param Collection $resources
  @param \Closure   $callback