fix views
build
: Server error upon visiting extension pages with custom controllers
This commit is contained in:
parent
142f3caa01
commit
2169beb507
3 changed files with 3 additions and 3 deletions
|
@ -3,7 +3,6 @@
|
|||
namespace Pterodactyl\Http\Controllers\Admin\Extensions\[id];
|
||||
|
||||
use Illuminate\View\View;
|
||||
use Pterodactyl\Models\Egg;
|
||||
use Illuminate\View\Factory as ViewFactory;
|
||||
use Pterodactyl\Http\Controllers\Controller;
|
||||
use Pterodactyl\Services\Helpers\SoftwareVersionService;
|
||||
|
@ -30,7 +29,6 @@ class [id]ExtensionController extends Controller
|
|||
return $this->view->make('admin.extensions.[id].index', [
|
||||
'blueprint' => $this->blueprint,
|
||||
'version' => $this->version,
|
||||
'eggs' => Egg::all(),
|
||||
'root' => $rootPath
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -2,10 +2,12 @@
|
|||
<?php
|
||||
use Pterodactyl\BlueprintFramework\Libraries\ExtensionLibrary\Admin\BlueprintAdminLibrary as BlueprintExtensionLibrary;
|
||||
use Pterodactyl\BlueprintFramework\Services\PlaceholderService\BlueprintPlaceholderService;
|
||||
use Pterodactyl\Models\Egg;
|
||||
|
||||
$settings = app()->make('Pterodactyl\Contracts\Repository\SettingsRepositoryInterface');
|
||||
$blueprint = app()->make(BlueprintExtensionLibrary::class, ['settings' => $settings]);
|
||||
$PlaceholderService = app()->make(BlueprintPlaceholderService::class);
|
||||
$Eggs = Egg::all();
|
||||
?>
|
||||
@endsection
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<label class="control-label">Route eggs</label>
|
||||
<select multiple class="pOptions form-control" name="{{ $EXTENSION_ID }}_eggs[]">
|
||||
<option value="-1" @if(in_array('-1', json_decode($blueprint->dbGet('blueprint', 'extensionconfig_'.$EXTENSION_ID.'_eggs') ?: '["-1"]'))) selected @endif>Show on all eggs</option>
|
||||
@foreach ($eggs as $egg)
|
||||
@foreach ($Eggs as $egg)
|
||||
<option value="{{ $egg->id }}" @if(in_array(strval($egg->id), json_decode($blueprint->dbGet('blueprint', 'extensionconfig_'.$EXTENSION_ID.'_eggs') ?: '["-1"]'))) selected @endif>{{ $egg->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
|
Loading…
Reference in a new issue