Add union return to better typehint

This commit is contained in:
Dan
2022-03-01 09:49:30 -05:00
parent e18dbeb5fe
commit 4d98d2026b
@@ -120,7 +120,7 @@ trait InteractsWithTableQuery
return $this->getRelationship($query)->getModel();
}
protected function getRelationship(Builder $query): Relation
protected function getRelationship(Builder $query): Relation|Builder
{
return $this->getQueryModel($query)->{$this->getRelationshipName()}();
}