@@ -46,7 +46,7 @@ |
||
| 46 | 46 | * Store a newly created resource in storage. |
| 47 | 47 | * |
| 48 | 48 | * @param \Illuminate\Http\Request $request |
| 49 | - * @return \Illuminate\Http\Response |
|
| 49 | + * @return \Illuminate\Http\RedirectResponse |
|
| 50 | 50 | */ |
| 51 | 51 | public function store(Request $request) |
| 52 | 52 | { |
@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | public function list_devices(Request $request) { |
| 20 | 20 | if ($request->user()->level >= 10 || $request->user()->level == 5) { |
| 21 | 21 | return Device::all(); |
| 22 | - } |
|
| 23 | - else { |
|
| 22 | + } else { |
|
| 24 | 23 | return User::find($request->user()->user_id)->devices()->get(); |
| 25 | 24 | } |
| 26 | 25 | } |
@@ -31,8 +30,7 @@ discard block |
||
| 31 | 30 | public function list_ports(Request $request) { |
| 32 | 31 | if ($request->user()->level >= 10 || $request->user()->level == 5) { |
| 33 | 32 | return Port::all(); |
| 34 | - } |
|
| 35 | - else { |
|
| 33 | + } else { |
|
| 36 | 34 | return User::find($request->user()->user_id)->ports()->get(); |
| 37 | 35 | } |
| 38 | 36 | } |
@@ -19,8 +19,7 @@ discard block |
||
| 19 | 19 | public function list_devices(Request $request) { |
| 20 | 20 | if ($request->user()->level >= 10 || $request->user()->level == 5) { |
| 21 | 21 | return Device::all(); |
| 22 | - } |
|
| 23 | - else { |
|
| 22 | + } else { |
|
| 24 | 23 | return User::find($request->user()->user_id)->devices()->get(); |
| 25 | 24 | } |
| 26 | 25 | } |
@@ -31,8 +30,7 @@ discard block |
||
| 31 | 30 | public function list_ports(Request $request) { |
| 32 | 31 | if ($request->user()->level >= 10 || $request->user()->level == 5) { |
| 33 | 32 | return Port::all(); |
| 34 | - } |
|
| 35 | - else { |
|
| 33 | + } else { |
|
| 36 | 34 | return User::find($request->user()->user_id)->ports()->get(); |
| 37 | 35 | } |
| 38 | 36 | } |