Completed
Push — master ( f3d89b...1e5804 )
by Vojta
02:07
created
models/Brand.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
     use ValidationTrait;
15 15
 
16
-    public $implement = ['@RainLab.Translate.Behaviors.TranslatableModel'];
16
+    public $implement = [ '@RainLab.Translate.Behaviors.TranslatableModel' ];
17 17
 
18 18
     public $table = 'vojtasvoboda_brands_brands';
19 19
 
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
24 24
         'description' => 'max:10000',
25 25
     ];
26 26
 
27
-    public $translatable = ['name', 'slug', 'description'];
27
+    public $translatable = [ 'name', 'slug', 'description' ];
28 28
 
29
-    public $dates = ['created_at', 'updated_at', 'deleted_at'];
29
+    public $dates = [ 'created_at', 'updated_at', 'deleted_at' ];
30 30
 
31 31
     public $attachOne = [
32
-        'logo' => ['System\Models\File'],
32
+        'logo' => [ 'System\Models\File' ],
33 33
     ];
34 34
 
35 35
     public $attachMany = [
36
-        'images' => ['System\Models\File'],
36
+        'images' => [ 'System\Models\File' ],
37 37
     ];
38 38
 
39 39
     public $belongsToMany = [
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         ], $options));
75 75
 
76 76
         // search by config
77
-        $searchableFields = ['name'];
77
+        $searchableFields = [ 'name' ];
78 78
 
79 79
         // only enabled
80 80
         if ($enabled) {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         // category filtration
85 85
         if ($category instanceof Category) {
86
-            $query->whereHas('categories', function ($query) use ($category) {
86
+            $query->whereHas('categories', function($query) use ($category) {
87 87
                 $query->where('category_id', $category->id);
88 88
             });
89 89
         }
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
         if ($letter && strlen($letter) == 1) {
92 92
             $query
93 93
                 ->where(function($q) use ($letter) {
94
-                    $q->where('name', 'LIKE', mb_strtolower($letter) . '%')
95
-                        ->orWhere('name', 'LIKE', mb_strtoupper($letter) . '%');
94
+                    $q->where('name', 'LIKE', mb_strtolower($letter).'%')
95
+                        ->orWhere('name', 'LIKE', mb_strtoupper($letter).'%');
96 96
                 });
97 97
         }
98 98
 
Please login to merge, or discard this patch.