Introduce new Setting model. Set the site name.
This commit is contained in:
27
app/database/seeds/SettingsTableSeeder.php
Normal file
27
app/database/seeds/SettingsTableSeeder.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
class SettingsTableSeeder extends Seeder {
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
Eloquent::unguard();
|
||||
|
||||
$defaultSettings = [
|
||||
[
|
||||
"name" => "site_name",
|
||||
"value" => "Test"
|
||||
]
|
||||
];
|
||||
|
||||
Setting::truncate();
|
||||
|
||||
foreach($defaultSettings as $setting) {
|
||||
Setting::create($setting);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user