Skip to content

Commit a047b01

Browse files
Obrainwavegithub-actions[bot]
authored andcommitted
Fix styling
1 parent 8b52c9c commit a047b01

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

config/query-filters.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
| You can also override per model via $globalSearchKey property.
2121
|
2222
*/
23-
'global_key' => 'q',
23+
'global_key' => 'q',
2424

2525
/*
2626
|--------------------------------------------------------------------------
@@ -55,7 +55,7 @@
5555
| /users?status=active&role=admin
5656
|
5757
*/
58-
'allowed_filters' => [
58+
'allowed_filters' => [
5959
// 'status',
6060
// 'role',
6161
// 'email',
@@ -77,7 +77,7 @@
7777
| /users?name=John&mode=like => partial match if mode is changed
7878
|
7979
*/
80-
'default_match' => 'exact',
80+
'default_match' => 'exact',
8181

8282
/*
8383
|--------------------------------------------------------------------------
@@ -97,7 +97,7 @@
9797
| 'user.*' => 'like' // wildcard on all user columns
9898
|
9999
*/
100-
'filter_modes' => [
100+
'filter_modes' => [
101101
// 'email' => 'strict',
102102
// 'name' => 'like',
103103
// 'user.*' => 'like',
@@ -116,8 +116,8 @@
116116
| Config fallback if none specified
117117
|
118118
*/
119-
'pagination' => [
120-
'per_page' => 10, // default items per page
119+
'pagination' => [
120+
'per_page' => 10, // default items per page
121121
'max_per_page' => 100, // maximum items allowed per page
122122
],
123123

@@ -135,9 +135,9 @@
135135
| 'allowed_columns' => ['name', 'created_at']
136136
|
137137
*/
138-
'sorting' => [
138+
'sorting' => [
139139
'allowed_columns' => [], // empty = all allowed
140-
'default' => null, // e.g., 'created_at' or '-created_at'
140+
'default' => null, // e.g., 'created_at' or '-created_at'
141141
],
142142

143143
/*
@@ -157,7 +157,7 @@
157157
| Disable by setting 'enabled' => false
158158
|
159159
*/
160-
'operators' => [
160+
'operators' => [
161161
'enabled' => true,
162162
],
163163

src/Concerns/HandlesGlobalSearch.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
namespace Obrainwave\LaravelQueryFilters\Concerns;
34

45
trait HandlesGlobalSearch
@@ -20,8 +21,8 @@ protected function getGlobalSearchKey(): string
2021

2122
protected function applyGlobalSearch(string $term): void
2223
{
23-
$term = strtolower($term);
24-
$model = $this->builder->getModel();
24+
$term = strtolower($term);
25+
$model = $this->builder->getModel();
2526
$allColumns = \Schema::getColumnListing($model->getTable());
2627

2728
if ($model && method_exists($model, 'getGlobalSearchColumns')) {
@@ -38,7 +39,7 @@ protected function applyGlobalSearch(string $term): void
3839
['name', 'title', 'content', 'body', 'message', 'subject'],
3940
$allColumns
4041
);
41-
42+
4243
}
4344

4445
$strict = config('queryfilters.strict_global_search', false);
@@ -62,5 +63,4 @@ protected function applyGlobalSearch(string $term): void
6263
});
6364
}
6465
}
65-
6666
}

0 commit comments

Comments
 (0)