Merge branch 'settings' into dev

This commit is contained in:
Michal Kváček
2016-03-14 00:53:48 +01:00
22 changed files with 484 additions and 31 deletions
@@ -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');
}
}