radarrplexorganizrnginxsonarrdashboardserverhomepagesabnzbdheimdallembycouchpotatonzbgetbookmarkapplication-dashboardmuximuxlandingpagestartpagelandinghtpc
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.0 KiB
71 lines
2.0 KiB
7 years ago
|
<?php
|
||
|
|
||
|
use Illuminate\Database\Seeder;
|
||
|
use App\Setting;
|
||
|
use App\SettingGroup;
|
||
|
|
||
|
class SettingsSeeder extends Seeder
|
||
|
{
|
||
|
/**
|
||
|
* Run the database seeds.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function run()
|
||
|
{
|
||
|
// Groups
|
||
|
if(!SettingGroup::find(1)) {
|
||
|
$setting_group = new SettingGroup;
|
||
|
$setting_group->id = 1;
|
||
|
$setting_group->title = 'System';
|
||
|
$setting_group->order = 0;
|
||
|
$setting_group->save();
|
||
|
}
|
||
|
if(!SettingGroup::find(2)) {
|
||
|
$setting_group = new SettingGroup;
|
||
|
$setting_group->id = 2;
|
||
|
$setting_group->title = 'Appearance';
|
||
|
$setting_group->order = 1;
|
||
|
$setting_group->save();
|
||
|
}
|
||
|
if(!SettingGroup::find(3)) {
|
||
|
$setting_group = new SettingGroup;
|
||
|
$setting_group->id = 3;
|
||
|
$setting_group->title = 'Miscellaneous';
|
||
|
$setting_group->order = 2;
|
||
|
$setting_group->save();
|
||
|
}
|
||
|
|
||
|
if(!Setting::find(1)) {
|
||
|
$setting = new Setting;
|
||
|
$setting->id = 1;
|
||
|
$setting->group_id = 1;
|
||
|
$setting->key = 'version';
|
||
|
$setting->type = 'text';
|
||
|
$setting->label = 'Version';
|
||
|
$setting->value = config('app.version');
|
||
|
$setting->system = true;
|
||
|
$setting->save();
|
||
|
}
|
||
|
if(!Setting::find(2)) {
|
||
|
$setting = new Setting;
|
||
|
$setting->id = 2;
|
||
|
$setting->group_id = 2;
|
||
|
$setting->key = 'background_image';
|
||
|
$setting->type = 'image';
|
||
|
$setting->label = 'Background Image';
|
||
|
$setting->save();
|
||
|
}
|
||
|
if(!Setting::find(3)) {
|
||
|
$setting = new Setting;
|
||
|
$setting->id = 3;
|
||
|
$setting->group_id = 3;
|
||
|
$setting->key = 'homepage_search';
|
||
|
$setting->type = 'text';
|
||
|
$setting->label = 'Homepage Search';
|
||
|
$setting->save();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|