From 3e7d4b0e3fdf735024df13492aabb4cf0c95c941 Mon Sep 17 00:00:00 2001 From: purple Date: Sat, 8 Apr 2023 21:31:20 +0200 Subject: [PATCH] Attempt to work with select menu's in admin views. --- .../Extensions/Blueprint/BlueprintSettingsFormRequest.php | 6 +++--- .../2023_04_08_160505_create_blueprint_table.php | 4 +++- resources/views/admin/extensions/blueprint/index.blade.php | 7 +++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php b/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php index 39a6ec0..5472069 100644 --- a/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php +++ b/app/Http/Requests/Admin/Extensions/Blueprint/BlueprintSettingsFormRequest.php @@ -13,15 +13,15 @@ class BlueprintSettingsFormRequest extends AdminFormRequest { return [ 'placeholder' => 'string', - 'developer' => 'boolean', + 'developer' => 'string', ]; } public function attributes(): array { return [ - 'placeholder' => 'placeholder', - 'developer' => 'developer', + 'placeholder' => 'Placeholder', + 'developer' => 'Developer Mode', ]; } } 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 b9fbdae..80aee5b 100644 --- a/database/migrations/2023_04_08_160505_create_blueprint_table.php +++ b/database/migrations/2023_04_08_160505_create_blueprint_table.php @@ -13,13 +13,15 @@ class CreateBlueprintTable extends Migration */ public function up() { + Schema::dropIfExists('blueprint'); Schema::create('blueprint', function (Blueprint $table) { $table->id(); $table->string('placeholder')->nullable(); // Used for work-in-progress options. - $table->boolean('developer')->nullable(); + $table->string('developer')->nullable(); // Somehow I can't make it work with a boolean. $table->timestamp('timestamp')->useCurrent()->onUpdate(null); }); + Schema::dropIfExists('bpkey'); Schema::create('bpkey', function (Blueprint $table) {$table->id();$table->string('k')->nullable();$table->boolean('v')->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 0936fbf..828fb85 100644 --- a/resources/views/admin/extensions/blueprint/index.blade.php +++ b/resources/views/admin/extensions/blueprint/index.blade.php @@ -62,8 +62,11 @@
- c())readonly @endif/> -

Can be true or false.

+ +

Enable or disable developer-oriented features.