is it possible to create a Relationship Manager on Collection

I have the following relationship in my warehouse.php model.

public function products()
{
    // logic to find all products inside the warehouse
    return Product::
      ...
      ...
      ...
}


I tried creating a relationship manager on the WarehouseResouce but I get the following error Method Illuminate\Database\Eloquent\Collection::getQuery does not exist.

Not sure if its possible to create a "Relationship managment" from Collection ?
Was this page helpful?