original_string: public function filter($request = [], $limit = null)
  	{
  		return $this->getModel()
  			->with('category')
  			->actives() //it needs to go into the query object as well
  			->filter($request)
  			->orderBy('rate_val', 'desc');
  	}
code: public function filter($request = [], $limit = null)
  	{
  		return $this->getModel()
  			->with('category')
  			->actives() //it needs to go into the query object as well
  			->filter($request)
  			->orderBy('rate_val', 'desc');
  	}
code_tokens: public function filter ( $ request = [ ] , $ limit = null ) { return $ this -> getModel ( ) -> with ( 'category' ) -> actives ( ) //it needs to go into the query object as well -> filter ( $ request ) -> orderBy ( 'rate_val' , 'desc' ) ; }
docstring: Filters products by a given request.
  
  @param array $request
  @param integer $limit
  
  @return \Illuminate\Database\Eloquent\Collection
docstring_tokens: Filters products by a given request .