53 lines
1.8 KiB
PHP
53 lines
1.8 KiB
PHP
<?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();
|
|
}
|
|
|
|
/**
|
|
* 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();
|
|
}
|
|
}
|