Completed
Push — master ( ffe767...90fa06 )
by Brandon
02:24
created
app/Http/Controllers/DeviceController.php 1 patch
Braces   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,10 +68,11 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $device = Device::findOrFail($id);
70 70
         $location = Location::where('id', $device->location_id)->first();
71
-        if ($location)
72
-            $site = Site::where('id', $location->site_id)->first();
73
-        else
74
-            $site = null;
71
+        if ($location) {
72
+                    $site = Site::where('id', $location->site_id)->first();
73
+        } else {
74
+                    $site = null;
75
+        }
75 76
 
76 77
         return view('device.edit', ['device' => $device, 'location' => $location, 'site' => $site]);
77 78
     }
@@ -155,8 +156,7 @@  discard block
 block discarded – undo
155 156
         {
156 157
             // if the user was already deleted then permananetly delete it
157 158
             Device::destroy($id);
158
-        }
159
-        else
159
+        } else
160 160
         {
161 161
             //Remove the location from the device
162 162
             $oldLocation_id = $device->location_id;
Please login to merge, or discard this patch.