FEATURE: add settings table
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateSettingsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('settings', function (Blueprint $table) {
|
||||
$table->integer('id', true);
|
||||
$table->string('key', 64)
|
||||
->unique()
|
||||
->comment('User readable key for accessing value of this config. Config will be available under this key also in views.');
|
||||
$table->text('value')
|
||||
->comment('Value of config.');
|
||||
$table->boolean('load_into_views')
|
||||
->default(true)
|
||||
->comment('Use in views directly?')
|
||||
->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('settings');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user