Completed
Branch develop (df0c9c)
by Eliurkis
01:47
created
src/CrudController.php 2 patches
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -178,6 +178,9 @@  discard block
 block discarded – undo
178 178
 
179 179
     /* Private Actions */
180 180
 
181
+    /**
182
+     * @param Request $request
183
+     */
181 184
     protected function filters($entity, $request)
182 185
     {
183 186
         if ($request->query('filter')) {
@@ -219,6 +222,9 @@  discard block
 block discarded – undo
219 222
         }
220 223
     }
221 224
 
225
+    /**
226
+     * @param Request $request
227
+     */
222 228
     protected function paginate($entity, $request)
223 229
     {
224 230
         $rows = $entity->paginate($this->paginate);
@@ -236,6 +242,9 @@  discard block
 block discarded – undo
236 242
         return $rows;
237 243
     }
238 244
 
245
+    /**
246
+     * @param Request $request
247
+     */
239 248
     protected function search($entity, $request)
240 249
     {
241 250
         if ($request->get('q') != '') {
@@ -281,6 +290,9 @@  discard block
 block discarded – undo
281 290
         return $fields;
282 291
     }
283 292
 
293
+    /**
294
+     * @param Request $request
295
+     */
284 296
     protected function updateForeignRelations($row, $request)
285 297
     {
286 298
         $foreignRelations = $this->getForeignRelationsFields();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         if ($request->get('q') != '') {
245 245
             $searchableCols = isset($this->searchable['columns']) ? $this->searchable['columns'] : $this->searchable;
246 246
 
247
-            $entity = $entity->where(function ($query) use ($request, $searchableCols) {
247
+            $entity = $entity->where(function($query) use ($request, $searchableCols) {
248 248
                 foreach ($searchableCols as $field) {
249 249
                     $query->orWhere($field, 'like', '%'.$request->get('q').'%');
250 250
                 }
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 
291 291
         foreach ($foreignRelations as $foreignRelation) {
292 292
             $values = $request->get($foreignRelation);
293
-            $row->$foreignRelation()->sync((array)$values);
293
+            $row->$foreignRelation()->sync((array) $values);
294 294
         }
295 295
     }
296 296
 
Please login to merge, or discard this patch.
src/FieldTypes/Foreign.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
             $uniqueId = uniqid('opt', true).md5(mt_rand(1, 1000));
15 15
             $html .=
16 16
                 '<div class="col-md-'.$colsSize.' col-xs-12">'.
17
-                \Form::checkbox($name.'[]', $key, in_array($key, (array)$value) ? true : false, ['id' => $uniqueId]).
17
+                \Form::checkbox($name.'[]', $key, in_array($key, (array) $value) ? true : false, ['id' => $uniqueId]).
18 18
                 \Form::label($uniqueId, $option).
19 19
                 '</div>';
20 20
         }
Please login to merge, or discard this patch.