Skip to content

Commit 283bb24

Browse files
authored
[6.x] Make newPivotQuery public (#31677)
* Make newPivotQuery public * Make newPivotQuery public
1 parent f881d00 commit 283bb24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ public function newPivotStatementForId($id)
532532
*
533533
* @return \Illuminate\Database\Query\Builder
534534
*/
535-
protected function newPivotQuery()
535+
public function newPivotQuery()
536536
{
537537
$query = $this->newPivotStatement();
538538

src/Illuminate/Database/Eloquent/Relations/MorphToMany.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery,
120120
*
121121
* @return \Illuminate\Database\Query\Builder
122122
*/
123-
protected function newPivotQuery()
123+
public function newPivotQuery()
124124
{
125125
return parent::newPivotQuery()->where($this->morphType, $this->morphClass);
126126
}

0 commit comments

Comments
 (0)