Build a query similar to this:
Incident::on(Database::get())
->with(['object'])
->withColumns([
'object.id_tags',
'object.source.name',
'object.source.type'
]);
Now ->count() said query and then iterate it.
You'll notice that the iteration now includes columns you didn't ask for.
Build a query similar to this:
Now
->count()said query and then iterate it.You'll notice that the iteration now includes columns you didn't ask for.