app/Http/Controllers/API/NodeController.php 1 location
|
@@ 145-150 (lines=6) @@
|
| 142 |
|
]); |
| 143 |
|
}); |
| 144 |
|
|
| 145 |
|
if (! is_null($request->input('fields'))) { |
| 146 |
|
$fields = explode(',', $request->input('fields')); |
| 147 |
|
if (! empty($fields) && is_array($fields)) { |
| 148 |
|
return collect($node)->only($fields); |
| 149 |
|
} |
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
return $node; |
| 153 |
|
} |
app/Http/Controllers/API/ServerController.php 1 location
|
@@ 109-114 (lines=6) @@
|
| 106 |
|
throw new NotFoundHttpException('No server by that ID was found.'); |
| 107 |
|
} |
| 108 |
|
|
| 109 |
|
if (! is_null($request->input('fields'))) { |
| 110 |
|
$fields = explode(',', $request->input('fields')); |
| 111 |
|
if (! empty($fields) && is_array($fields)) { |
| 112 |
|
return collect($server)->only($fields); |
| 113 |
|
} |
| 114 |
|
} |
| 115 |
|
|
| 116 |
|
if ($request->input('daemon') === 'true') { |
| 117 |
|
try { |
app/Http/Controllers/API/UserController.php 1 location
|
@@ 90-95 (lines=6) @@
|
| 87 |
|
]); |
| 88 |
|
}); |
| 89 |
|
|
| 90 |
|
if (! is_null($request->input('fields'))) { |
| 91 |
|
$fields = explode(',', $request->input('fields')); |
| 92 |
|
if (! empty($fields) && is_array($fields)) { |
| 93 |
|
return collect($user)->only($fields); |
| 94 |
|
} |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
return $user->toArray(); |
| 98 |
|
} |