Completed
Push — develop ( 58e413...cd503a )
by Eliurkis
01:55
created
src/CrudController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $this->entity = $entity;
46 46
 
47
-        $config = count($config) ? $config : config('crud.' . $this->route);
47
+        $config = count($config) ? $config : config('crud.'.$this->route);
48 48
 
49 49
         foreach ($config as $key => $value) {
50 50
             $this->$key = $value;
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
     public function edit($id)
127 127
     {
128
-        if (! $this->entityInstance) {
128
+        if (!$this->entityInstance) {
129 129
             $this->entityInstance = $this->entity->findOrFail($id);
130 130
         }
131 131
 
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         if ($request->get('q') != '') {
270 270
             $searchableCols = isset($this->searchable['columns']) ? $this->searchable['columns'] : $this->searchable;
271 271
 
272
-            $entity = $entity->where(function (Builder $query) use ($request, $searchableCols) {
272
+            $entity = $entity->where(function(Builder $query) use ($request, $searchableCols) {
273 273
                 foreach ($searchableCols as $field) {
274 274
                     $query->orWhere($field, 'like', '%'.$request->get('q').'%');
275 275
                 }
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
         $links = ['index', 'create', 'store'];
344 344
 
345 345
         foreach ($links as $link) {
346
-            if (! isset($this->links[$link])) {
346
+            if (!isset($this->links[$link])) {
347 347
                 $this->links[$link] = route($this->route.'.'.$link);
348 348
             }
349 349
         }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
         $config['cols'] = isset($config['cols']) ? $config['cols'] : 1;
388 388
 
389 389
         // Get foreign values
390
-        if (! count($config['options']) && isset($config['entity'])) {
390
+        if (!count($config['options']) && isset($config['entity'])) {
391 391
             $config['options'] = $config['entity']::get()
392 392
                 ->lists($config['field_value'], $config['field_key'])
393 393
                 ->toArray();
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
     protected function prepareField($name, $properties = [])
420 420
     {
421 421
         // Init
422
-        if (! $properties) {
422
+        if (!$properties) {
423 423
             $properties = $this->fields[$name];
424 424
         }
425 425
 
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
 
437 437
         // Define field type class namespace
438 438
         $className = '\Eliurkis\Crud\FieldTypes\\'.ucfirst($properties['type']);
439
-        if (! class_exists($className)) {
439
+        if (!class_exists($className)) {
440 440
             return;
441 441
         }
442 442
 
Please login to merge, or discard this patch.