From 720f6783ef0b8545ec5f1718d294ba2ae01db712 Mon Sep 17 00:00:00 2001 From: purple Date: Mon, 11 Sep 2023 10:38:21 +0200 Subject: [PATCH] Attempt at making $blueprint work correctly in admin layout. --- resources/views/layouts/admin.blade.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/views/layouts/admin.blade.php b/resources/views/layouts/admin.blade.php index 82176f2..0902361 100644 --- a/resources/views/layouts/admin.blade.php +++ b/resources/views/layouts/admin.blade.php @@ -1,7 +1,10 @@ @php - // if this works i'm going to be really happy - use Pterodactyl\BlueprintFramework\Libraries\ExtensionLibrary\Admin\BlueprintAdminLibrary as BlueprintExtensionLibrary; - $blueprint = new BlueprintExtensionLibrary(); + // Allow BlueprintExtensionLibrary to work in all admin views without + // modifying all admin page controllers. Doing this should preserve + // basic compatibility for other modifications. + use Pterodactyl\BlueprintFramework\Libraries\ExtensionLibrary\Admin\BlueprintAdminLibrary; + $settings = app()->make('Pterodactyl\Contracts\Repository\SettingsRepositoryInterface'); + $blueprint = app()->make(BlueprintAdminLibrary::class, ['settings' => $settings]); @endphp