From 96c56cb30482345863b7007696a4ae5101e9627c Mon Sep 17 00:00:00 2001 From: Bayu Hendra Winata Date: Mon, 9 Mar 2020 09:11:41 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/ServiceProvider.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ServiceProvider.php b/src/ServiceProvider.php index 762fd10..1ecacd8 100644 --- a/src/ServiceProvider.php +++ b/src/ServiceProvider.php @@ -43,7 +43,8 @@ public function boot() $this->publishes( [ __DIR__.'/../config/indonesia.php' => config_path('laravolt/indonesia.php'), - ], 'config' + ], + 'config' ); } @@ -97,10 +98,12 @@ protected function registerMacro() function (EloquentBuilder $query) use ($attribute, $searchTerm) { [$relationName, $relationAttribute] = explode('.', $attribute); - $query->orWhereHas($relationName, + $query->orWhereHas( + $relationName, function (EloquentBuilder $query) use ($relationAttribute, $searchTerm) { $query->where($relationAttribute, 'LIKE', "%{$searchTerm}%"); - }); + } + ); }, function (EloquentBuilder $query) use ($attribute, $searchTerm) { $table = $query->getModel()->getTable();