Attempt to work with select menu's in admin views.
This commit is contained in:
parent
9eded0df5d
commit
3e7d4b0e3f
3 changed files with 11 additions and 6 deletions
|
@ -13,15 +13,15 @@ class BlueprintSettingsFormRequest extends AdminFormRequest
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'placeholder' => 'string',
|
'placeholder' => 'string',
|
||||||
'developer' => 'boolean',
|
'developer' => 'string',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function attributes(): array
|
public function attributes(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'placeholder' => 'placeholder',
|
'placeholder' => 'Placeholder',
|
||||||
'developer' => 'developer',
|
'developer' => 'Developer Mode',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,13 +13,15 @@ class CreateBlueprintTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
|
Schema::dropIfExists('blueprint');
|
||||||
Schema::create('blueprint', function (Blueprint $table) {
|
Schema::create('blueprint', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('placeholder')->nullable(); // Used for work-in-progress options.
|
$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);
|
$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);});
|
Schema::create('bpkey', function (Blueprint $table) {$table->id();$table->string('k')->nullable();$table->boolean('v')->nullable();$table->timestamp('timestamp')->useCurrent()->onUpdate(null);});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,8 +62,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<label class="control-label">Developer Mode</label>
|
<label class="control-label">Developer Mode</label>
|
||||||
<input type="text" required name="developer" id="placeholder" value="{{ $bp->dbGet('developer') }}" class="form-control" @if(!$bp->c())readonly @endif/>
|
<select class="form-control" name="developer">
|
||||||
<p class="text-muted small">Can be true or false.</p>
|
<option value="false">Disabled</option>
|
||||||
|
<option value="true" @if($bp->dbGet('developer')) @endif>Enabled</option>
|
||||||
|
</select>
|
||||||
|
<p class="text-muted small">Enable or disable developer-oriented features.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue