Skip to content

Commit 359d84a

Browse files
🐛 Scout builder: macro + call bad method (#36)
Co-authored-by: Thomas Poirey <t.poirey@xefi.fr>
1 parent b796493 commit 359d84a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/AccessServiceProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ public function boot()
5252
protected function bootScoutBuilder(): void
5353
{
5454
if (class_exists(Builder::class)) {
55-
Builder::macro('controlled', function (Builder $builder) {
56-
$control = $builder->model->newControl();
55+
Builder::macro('controlled', function () {
56+
$control = $this->model->newControl();
5757

58-
return $control->queried($builder, Auth::user());
58+
return $control->scoutQueried($this, Auth::user());
5959
});
6060
}
6161
}

0 commit comments

Comments
 (0)