@@ -42,7 +42,7 @@ class VueTableRequest
4242 /**
4343 * VueTableRequest constructor.
4444 *
45- * @param Builder $query
45+ * @param Builder $query
4646 */
4747 public function __construct (Builder $ query )
4848 {
@@ -71,7 +71,7 @@ public function runQuery()
7171 $ this ->columns = $ this ->request ->get ('columns ' ) ?? [];
7272 $ this ->filters = $ this ->request ->get ('filters ' ) ?? [];
7373 $ this ->perPage = $ this ->request ->get ('perPage ' ) ?? 15 ;
74- $ this ->search = $ this ->request ->get ('search ' ) ?? '' ;
74+ $ this ->search = $ this ->request ->get ('search ' ) ?? '' ;
7575
7676 $ this ->filterColumns ();
7777 $ this ->sortColumns ();
@@ -83,7 +83,7 @@ public function runQuery()
8383 /**
8484 * Add subselect queries to count the relations.
8585 *
86- * @param mixed $relations
86+ * @param mixed $relations
8787 */
8888 public function withCount ($ relations )
8989 {
@@ -110,7 +110,7 @@ private function extractColumnNames(): array
110110 $ names = [];
111111
112112 foreach ($ this ->columns as $ column => $ columnData ) {
113- if (!Str::contains ($ column , '. ' )) {
113+ if (! Str::contains ($ column , '. ' )) {
114114 $ names [] = $ column ;
115115 }
116116 }
@@ -124,11 +124,11 @@ private function extractColumnNames(): array
124124 private function filterColumns ()
125125 {
126126 foreach ($ this ->columns as $ name => $ settings ) {
127- if (!isset ($ settings ['value ' ])) {
127+ if (! isset ($ settings ['value ' ])) {
128128 continue ;
129129 }
130130
131- $ value = $ settings ['value ' ] ?? null ;
131+ $ value = $ settings ['value ' ] ?? null ;
132132 $ modifiers = $ settings ['modifiers ' ] ?? [];
133133
134134 if (Str::contains ($ name , '. ' )) {
@@ -152,9 +152,9 @@ private function filterColumns()
152152 /**
153153 * Apply a filter by searching a column and applying the modifiers.
154154 *
155- * @param Builder $query
156- * @param array $modifiers
157- * @param string $attribute
155+ * @param Builder $query
156+ * @param array $modifiers
157+ * @param string $attribute
158158 * @param $values
159159 */
160160 protected function applyFilter (Builder $ query , array $ modifiers , string $ attribute , $ values )
@@ -197,7 +197,7 @@ private function searchColumns()
197197
198198 $ this ->query ->where (function ($ query ) use (&$ relations ) {
199199 foreach ($ this ->columns as $ name => $ settings ) {
200- $ isSearchable = ( bool )( $ settings ['searchable ' ] ?? false );
200+ $ isSearchable = filter_var ( $ settings ['searchable ' ], FILTER_VALIDATE_BOOLEAN );
201201
202202 if ($ isSearchable ) {
203203 if (Str::contains ($ name , '. ' )) {
0 commit comments