Skip to content

Commit

Permalink
Merge pull request #61 from laravolt/analysis-nN0vaw
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
uyab authored Mar 9, 2020
2 parents c47bc2e + 96c56cb commit 92bbe2e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public function boot()
$this->publishes(
[
__DIR__.'/../config/indonesia.php' => config_path('laravolt/indonesia.php'),
], 'config'
],
'config'
);
}

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 92bbe2e

Please sign in to comment.