Passed
Push — main ( 21b81c...b80092 )
by PRATIK
14:07
created
src/Repositories/PopupRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     public function indexPopup()
15 15
     {
16 16
         $popups = config('adminetic.caching', true)
17
-            ? (Cache::has('popups') ? Cache::get('popups') : Cache::rememberForever('popups', function () {
17
+            ? (Cache::has('popups') ? Cache::get('popups') : Cache::rememberForever('popups', function() {
18 18
                 return Popup::latest()->get();
19 19
             }))
20 20
             : Popup::latest()->get();
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
                 'image' => request()->image->store('website/popup', 'public')
68 68
             ]);
69 69
             if (request()->file('image')->getClientOriginalExtension() == 'gif') {
70
-                $imageName = time() . '.' . request()->image->extension();
70
+                $imageName = time().'.'.request()->image->extension();
71 71
 
72 72
                 request()->image->move(public_path('website/popup'), $imageName);
73 73
             } else {
74 74
                 $image = Image::make(request()->file('image')->getRealPath());
75
-                $image->save(public_path('storage/' . $popup->image));
75
+                $image->save(public_path('storage/'.$popup->image));
76 76
             }
77 77
         }
78 78
     }
Please login to merge, or discard this patch.
src/Http/Requests/PopupRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     {
39 39
         $id = $this->popup->id ?? '';
40 40
         return [
41
-            'code' => 'required|unique:popups,code,' . $id,
41
+            'code' => 'required|unique:popups,code,'.$id,
42 42
             'name' => 'nullable|max:255',
43 43
             'image' => 'nullable|file|image|max:3000',
44 44
             'body' => 'nullable|max:5500',
Please login to merge, or discard this patch.
src/Models/Admin/Popup.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@
 block discarded – undo
17 17
     {
18 18
         parent::boot();
19 19
 
20
-        static::saving(function () {
20
+        static::saving(function() {
21 21
             self::cacheKey();
22 22
         });
23 23
 
24
-        static::deleting(function () {
24
+        static::deleting(function() {
25 25
             self::cacheKey();
26 26
         });
27 27
 
28
-        Popup::creating(function ($model) {
28
+        Popup::creating(function($model) {
29 29
             $model->position = Popup::max('position') + 1;
30 30
         });
31 31
     }
Please login to merge, or discard this patch.