title: Laravel Resource Collection Rest Api Query Filter
body: <p>I would like to add query params to my rest api. I created that in Resource Collections and now I cant find a way to add this functionality. Every tutorial is for other ways of creating api. I would like to add to endpoint /api/v1/product filtering by product code something like this: 
  /api/v1/product?product_code=0208588343711. This is my code</p>
  
  <p>Product Controller:</p>
  
  <pre><code>public function index(): ProductCollection
  {
      return new ProductCollection(Product::paginate());
  }
  </code></pre>
  
  <p>ProductCollection</p>
  
  <pre><code>class ProductCollection extends ResourceCollection
  {
      /**
       * Transform the resource collection into an array.
       *
       * @param  \Illuminate\Http\Request  $request
       * @return array
       */
      public function toArray($request)
      {
          return parent::toArray($request);
      }
  }
  </code></pre>