From 952aad38ecffc5b43f077826d726b21ae9b05a37 Mon Sep 17 00:00:00 2001 From: Thomas Poirey Date: Fri, 19 Sep 2025 15:39:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Scout=20builder:=20macro=20+=20c?= =?UTF-8?q?all=20bad=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AccessServiceProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AccessServiceProvider.php b/src/AccessServiceProvider.php index 6a7b79f..641b7c2 100644 --- a/src/AccessServiceProvider.php +++ b/src/AccessServiceProvider.php @@ -52,10 +52,10 @@ public function boot() protected function bootScoutBuilder(): void { if (class_exists(Builder::class)) { - Builder::macro('controlled', function (Builder $builder) { - $control = $builder->model->newControl(); + Builder::macro('controlled', function () { + $control = $this->model->newControl(); - return $control->queried($builder, Auth::user()); + return $control->scoutQueried($this, Auth::user()); }); } }