Completed
Push — user-management ( d87e21 )
by Tony
03:32
created
app/Http/Controllers/UserPortController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,11 +54,11 @@
 block discarded – undo
54 54
         $user = User::find($user_id);
55 55
 
56 56
         $port_ids = $request->input('ports');
57
-        if(count($port_ids) == 0) {
57
+        if (count($port_ids) == 0) {
58 58
             return redirect()->back();
59 59
         }
60 60
         
61
-        foreach($port_ids as $port_id) {
61
+        foreach ($port_ids as $port_id) {
62 62
             $port = Port::find($port_id);
63 63
             $user->ports()->attach($port);
64 64
         }
Please login to merge, or discard this patch.
app/Http/Controllers/UserDeviceController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@
 block discarded – undo
48 48
         $user = User::find($user_id);
49 49
 
50 50
         $device_ids = $request->input('devices');
51
-        if(count($device_ids) == 0) {
51
+        if (count($device_ids) == 0) {
52 52
             return redirect()->back();
53 53
         }
54 54
         
55
-        foreach($device_ids as $device_id) {
55
+        foreach ($device_ids as $device_id) {
56 56
             $device = Device::find($device_id);
57 57
             $user->devices()->attach($device);
58 58
         }
Please login to merge, or discard this patch.
app/Models/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
      * Encrypt passwords before saving
123 123
      * @param $password
124 124
      */
125
-    public function setPasswordAttribute($password){
125
+    public function setPasswordAttribute($password) {
126 126
         $this->attributes['password'] = bcrypt($password);
127 127
     }
128 128
 }
Please login to merge, or discard this patch.