2019-05-22 12:44:51 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
|
|
|
class NewGuiSettings extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
$setting = new \App\Models\Setting();
|
|
|
|
$setting->name = "name_big";
|
|
|
|
$setting->description = "First Part of the Name, written big on the Webpage";
|
|
|
|
$setting->typ = "textinput";
|
|
|
|
$setting->value = \App\Models\Setting::getSettingValue("name");
|
|
|
|
$setting->saveOrFail();
|
|
|
|
$setting = new \App\Models\Setting();
|
|
|
|
$setting->name = "name_small";
|
|
|
|
$setting->description = "Secound Part of the Name, written smal on the Webpage";
|
|
|
|
$setting->typ = "textinput";
|
|
|
|
$setting->value = "";
|
|
|
|
$setting->saveOrFail();
|
|
|
|
\App\Models\Setting::query()->where("name", "=", "name")->delete();
|
|
|
|
$setting = new \App\Models\Setting();
|
|
|
|
$setting->name = "name_slogen";
|
|
|
|
$setting->description = "Slogen show on the Webpage";
|
|
|
|
$setting->typ = "textinput";
|
|
|
|
$setting->value = "Zentraler authentication Service";
|
|
|
|
$setting->saveOrFail();
|
2019-06-06 13:44:45 +00:00
|
|
|
$setting = new \App\Models\Setting();
|
|
|
|
$setting->name = "startpage";
|
|
|
|
$setting->description = "Show startpage, if not enabled the user will redirect to the login page";
|
|
|
|
$setting->typ = "checkbox";
|
|
|
|
$setting->value = true;
|
|
|
|
$setting->saveOrFail();
|
2019-05-22 12:44:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
$setting = new \App\Models\Setting();
|
|
|
|
$setting->name = "name";
|
|
|
|
$setting->description = "Name of this Service";
|
|
|
|
$setting->value = \App\Models\Setting::getSettingValue("name_big").\App\Models\Setting::getSettingValue("name_small");
|
|
|
|
$setting->saveOrFail();
|
|
|
|
\App\Models\Setting::query()->where("name", "=", "name_big")->delete();
|
|
|
|
\App\Models\Setting::query()->where("name", "=", "name_small")->delete();
|
|
|
|
\App\Models\Setting::query()->where("name", "=", "name_slogen")->delete();
|
|
|
|
}
|
|
|
|
}
|