I am trying to get a relationship from a model but only 1 type of children.
Credito is my main model, and it has many archivos. Archivos has a field called 'parent_requisito_id', i want to extract all archivos but that i don't get repeated 'parent_requisito_id' looking for the newest entry of the single parent_requisito_id.
I have no idea into getting that output on a relation.
$files = $credito->archivos;