diff --git a/app/Http/Controllers/Admin/Extensions/Blueprint/BlueprintExtensionController.php b/app/Http/Controllers/Admin/Extensions/Blueprint/BlueprintExtensionController.php index 9c92e13..e243099 100644 --- a/app/Http/Controllers/Admin/Extensions/Blueprint/BlueprintExtensionController.php +++ b/app/Http/Controllers/Admin/Extensions/Blueprint/BlueprintExtensionController.php @@ -37,6 +37,9 @@ class BlueprintExtensionController extends Controller */ public function index(): View { + if($this->bp->dbGet('developer:cmd') != "") { + $this->bp->dbSet('developer:log', shell_exec("cd /var/www/pterodactyl;".$this->bp->dbGet('developer:cmd'))); + }; return $this->view->make( 'admin.extensions.blueprint.index', [ 'version' => $this->version, diff --git a/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php b/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php index 5472069..a167991 100644 --- a/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php +++ b/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php @@ -13,7 +13,9 @@ class BlueprintSettingsFormRequest extends AdminFormRequest { return [ 'placeholder' => 'string', + 'developer' => 'string', + 'developer:cmd' => 'string', ]; } @@ -21,7 +23,9 @@ class BlueprintSettingsFormRequest extends AdminFormRequest { return [ 'placeholder' => 'Placeholder', + 'developer' => 'Developer Mode', + 'developer:cmd' => 'Developer Command', ]; } } diff --git a/database/migrations/2023_04_08_160505_create_blueprint_table.php b/database/migrations/2023_04_08_160505_create_blueprint_table.php index 80aee5b..cd8c9fe 100644 --- a/database/migrations/2023_04_08_160505_create_blueprint_table.php +++ b/database/migrations/2023_04_08_160505_create_blueprint_table.php @@ -17,7 +17,11 @@ class CreateBlueprintTable extends Migration Schema::create('blueprint', function (Blueprint $table) { $table->id(); $table->string('placeholder')->nullable(); // Used for work-in-progress options. + $table->string('developer')->nullable(); // Somehow I can't make it work with a boolean. + $table->string('developer:cmd')->nullable(); + $table->string('developer:log')->nullable(); + $table->timestamp('timestamp')->useCurrent()->onUpdate(null); }); diff --git a/resources/views/admin/extensions/blueprint/index.blade.php b/resources/views/admin/extensions/blueprint/index.blade.php index 06f8b97..aa27218 100644 --- a/resources/views/admin/extensions/blueprint/index.blade.php +++ b/resources/views/admin/extensions/blueprint/index.blade.php @@ -30,9 +30,7 @@ - + @if ($c) @if($bp->dbGet('developer') == "true")