Skip to content

Commit

Permalink
Allow for using custom Eloquent query builder
Browse files Browse the repository at this point in the history
  • Loading branch information
riesjart authored and crynobone committed Feb 12, 2022
1 parent 3990800 commit f856c3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Eloquent.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ public static function unserialize(array $payload): EloquentQueryBuilder
// global removed scopes.

return $model->registerGlobalScopes(
(new EloquentQueryBuilder(
$model->newEloquentBuilder(
Query::unserialize($payload['builder'])
))->setModel($model)
)->setModel($model)
)
->setEagerLoads(
collect($payload['model']['eager'])->map(function ($callback) {
Expand Down

0 comments on commit f856c3d

Please sign in to comment.