Skip to content

Commit 8b44a1c

Browse files
committed
feat: remove unused getRelationCountQuery
1 parent a8aec3b commit 8b44a1c

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

src/Relations/HasMany.php

-13
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,6 @@ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery,
4545
return $query->select($foreignKey)->where($foreignKey, 'exists', true);
4646
}
4747

48-
/**
49-
* Add the constraints for a relationship count query.
50-
* @param Builder $query
51-
* @param Builder $parent
52-
* @return Builder
53-
*/
54-
public function getRelationCountQuery(Builder $query, Builder $parent)
55-
{
56-
$foreignKey = $this->getHasCompareKey();
57-
58-
return $query->select($foreignKey)->where($foreignKey, 'exists', true);
59-
}
60-
6148
/**
6249
* Get the name of the "where in" method for eager loading.
6350
* @param \Illuminate\Database\Eloquent\Model $model

src/Relations/HasOne.php

-13
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,6 @@ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery,
4545
return $query->select($foreignKey)->where($foreignKey, 'exists', true);
4646
}
4747

48-
/**
49-
* Add the constraints for a relationship count query.
50-
* @param Builder $query
51-
* @param Builder $parent
52-
* @return Builder
53-
*/
54-
public function getRelationCountQuery(Builder $query, Builder $parent)
55-
{
56-
$foreignKey = $this->getForeignKeyName();
57-
58-
return $query->select($foreignKey)->where($foreignKey, 'exists', true);
59-
}
60-
6148
/**
6249
* Get the name of the "where in" method for eager loading.
6350
* @param \Illuminate\Database\Eloquent\Model $model

0 commit comments

Comments
 (0)