I am trying to load with conditions a putaways relation on inventories collection but the following code is including the soft deleted Putaway models.
Is this a normal behaviour ?
$inventories->load([
'putaways' => function (HasMany $putawayRelationQuery) {
$putawayRelationQuery
->whereNull('deleted_at') // I have to add this line to exclude the soft deleted putaways
->where('status', 'done');
},
]);