Completed
Pull Request — master (#26)
by
unknown
02:01
created
app/Http/Controllers/ImageController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
     public function show($device_id)
27 27
     {
28 28
         $storagePath = storage_path('app/images/devices/');
29
-        $imagePath = glob($storagePath . $device_id . "*" . ".jpg");
29
+        $imagePath = glob($storagePath.$device_id."*".".jpg");
30 30
         
31 31
         if (!empty($imagePath))
32
-            $image = Image::make($imagePath[0]);
32
+            $image = Image::make($imagePath[ 0 ]);
33 33
         else
34 34
         {
35
-            $imagePath = public_path() . '/img/video_not_found.jpg';
35
+            $imagePath = public_path().'/img/video_not_found.jpg';
36 36
             $image = Image::make($imagePath);
37 37
         }
38 38
         
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function store($device_id, $binaryData)
50 50
     {
51
-        $storagePath = storage_path('app/images/devices/') . $device_id . '.jpg';
51
+        $storagePath = storage_path('app/images/devices/').$device_id.'.jpg';
52 52
         $image = Image::make($binaryData);
53 53
         $image->save($storagePath, 75);
54 54
     }
Please login to merge, or discard this patch.
app/Http/Controllers/DeviceController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,14 +76,14 @@
 block discarded – undo
76 76
                                         'id',
77 77
                                         'name',
78 78
                                     ])
79
-                                    ->orderByRaw(DB::raw("(id = " . $location->site_id . ") DESC"))
79
+                                    ->orderByRaw(DB::raw("(id = ".$location->site_id.") DESC"))
80 80
                                     ->get();
81 81
             $locations = Location::query()->select([
82 82
                                                 'id',
83 83
                                                 'name',
84 84
                                             ])
85 85
                                             ->where('site_id', '=', $location->site_id)
86
-                                            ->orderByRaw(DB::raw("(id = " . $device->location_id . ") DESC"))
86
+                                            ->orderByRaw(DB::raw("(id = ".$device->location_id.") DESC"))
87 87
                                             ->get();
88 88
         }
89 89
         else
Please login to merge, or discard this patch.