Skip to content

Commit a83d3e3

Browse files
committed
Update ScopeAsSelect.php
1 parent 4dd757a commit a83d3e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ScopeAsSelect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public static function addMacro(string $name = 'addScopeAsSelect')
7474
// Query the model and explicitly set the targetted table, as the model's table
7575
// is just the aliased table with the 'as' statement.
7676
$subSelect = $aliasedModel::query();
77-
$subSelect->getQuery()->from("{$originalTable} as {$aliasedTable}");
77+
$subSelect->getQuery()->from($originalTable, $aliasedTable);
7878

7979
// Apply the where constraint based on the model's key name and apply the $callable.
8080
$subSelect

0 commit comments

Comments
 (0)