I'm trying to get all the data from the parent that only has a child. Please see my code below.

```
$customers = Customer::with(['items' => function($query){
            return $query->where('status', 2);
        }])->get();

        dd($customers);

```

But the code above returns all the customer. By the way, I'm using laravel 4.2.

Items Table:
[![enter image description here](https://i.stack.imgur.com/vrfHW.png)](https://i.stack.imgur.com/vrfHW.png)

Customer Table:
[![enter image description here](https://i.stack.imgur.com/itujr.png)](https://i.stack.imgur.com/itujr.png)