Files
cachet-docker/database/seeds/SettingsTableSeeder.php
2015-05-25 17:53:06 +01:00

77 lines
1.8 KiB
PHP

<?php
/*
* This file is part of Cachet.
*
* (c) James Brooks <james@cachethq.io>
* (c) Joseph Cohen <joe@cachethq.io>
* (c) Graham Campbell <graham@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use CachetHQ\Cachet\Models\Setting;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Seeder;
class SettingsTableSeeder extends Seeder
{
/**
* Run the database seeding.
*/
public function run()
{
Model::unguard();
$defaultSettings = [
[
'name' => 'app_name',
'value' => 'Cachet Demo',
],
[
'name' => 'app_domain',
'value' => 'https://demo.cachethq.io',
],
[
'name' => 'show_support',
'value' => '1',
],
[
'name' => 'app_locale',
'value' => 'en',
],
[
'name' => 'app_timezone',
'value' => 'Europe/London',
],
[
'name' => 'app_track',
'value' => '1',
],
[
'name' => 'app_incident_days',
'value' => '7',
],
[
'name' => 'app_analytics',
'value' => 'UA-58442674-3',
],
[
'name' => 'app_analytics_gs',
'value' => 'GSN-712462-P',
],
[
'name' => 'display_graphs',
'value' => '1',
],
];
Setting::truncate();
foreach ($defaultSettings as $setting) {
Setting::create($setting);
}
}
}