FEATURE: seed settings table with some basic data

This commit is contained in:
Michal Kváček
2016-03-14 00:25:56 +01:00
parent 1353fbfd79
commit 62a600b5fc
2 changed files with 28 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Seeder;
class SeedSettings extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$types = [
['key' => 'pageName', 'value' => ''],
['key' => 'author', 'value' => ''],
['key' => 'metaKeywords', 'value' => ''],
['key' => 'metaDescription', 'value' => ''],
['key' => 'googleAnalyticsCode', 'value' => ''],
];
foreach ($types as $type) {
\DB::table('settings')
->insert($type);
}
}
}