Update server listing and associated logic to pull from the panel dynamiacally
This commit is contained in:
parent
952dff854e
commit
fb9c106448
26 changed files with 384 additions and 239 deletions
|
@ -5,6 +5,7 @@ namespace Pterodactyl\Http\Controllers\Api\Application;
|
|||
use Illuminate\Http\Request;
|
||||
use Webmozart\Assert\Assert;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Container\Container;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Pterodactyl\Extensions\Spatie\Fractalistic\Fractal;
|
||||
|
@ -30,7 +31,10 @@ abstract class ApplicationApiController extends Controller
|
|||
Container::getInstance()->call([$this, 'loadDependencies']);
|
||||
|
||||
// Parse all of the includes to use on this request.
|
||||
$includes = collect(explode(',', $this->request->input('include', '')))->map(function ($value) {
|
||||
$input = $this->request->input('include', []);
|
||||
$input = is_array($input) ? $input : explode(',', $input);
|
||||
|
||||
$includes = (new Collection($input))->map(function ($value) {
|
||||
return trim($value);
|
||||
})->filter()->toArray();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue