@@ -54,11 +54,11 @@ |
||
| 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 | } |
@@ -48,11 +48,11 @@ |
||
| 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 | } |
@@ -122,7 +122,7 @@ |
||
| 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 | } |