Is there any way to get the ID inside the query?

I don't know how to explain this fluently, but I'm trying to grab the product options for each product, but i need to use the product ID inside the with statement to do that.

Something like that but `$idOfModel` should obviously be the id of each product.

```
$products = Product::with('attributes', function($q) {
            $q->with('product_options', function($q) {
                $q->where('product_id', $idOfModel)->with('variable', function($q) {
                    $q->where('product_id', $idOfModel);
                });
            })->groupBy('id');
        })->take(10)->get();

```