Skip to content

Commit 051b4ba

Browse files
authored
fix: restore v8 behaviour of base query for relations (#41923)
1 parent f5c50ff commit 051b4ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public function getQuery()
307307
*/
308308
public function getBaseQuery()
309309
{
310-
return $this->toBase();
310+
return $this->query->getQuery();
311311
}
312312

313313
/**
@@ -317,7 +317,7 @@ public function getBaseQuery()
317317
*/
318318
public function toBase()
319319
{
320-
return $this->query->applyScopes()->getQuery();
320+
return $this->query->toBase();
321321
}
322322

323323
/**

0 commit comments

Comments
 (0)