I am trying to use Eloquent in Laravel in order to run a query. I am using the `with()` function in order to get the results from relationships, however this is always returning `null`. 

This is my code:

```
Posts::query()
    ->select('id')
    ->with([
        'author:id',
        'category.images:url',
     ]);

```

Dumping the query using the `getQueryLog()` function and if I run the query inside of a SQL client with the same bindings I get a result back, however the response looks like this...

```
{
    id: 1,
    category: {
       id: 1,
       category_images: null
    }
}

```

I've tried googling this issue and can't really find anything on it.

Thanks in advance.