1
0
mirror of https://github.com/flarum/core.git synced 2025-08-04 23:47:32 +02:00

Extract config into database

This commit is contained in:
Toby Zerner
2015-05-02 08:07:51 +09:30
parent a0ade68d65
commit c3aecbceaa
4 changed files with 18 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
<?php namespace Flarum\Core\Seeders;
use Illuminate\Database\Seeder;
use DB;
class ConfigTableSeeder extends Seeder {
@@ -11,7 +12,17 @@ class ConfigTableSeeder extends Seeder {
*/
public function run()
{
//
$config = [
'api_url' => 'http://flarum.dev/api',
'base_url' => 'http://flarum.dev',
'forum_title' => 'Flarum Demo Forum',
'welcome_message' => 'Flarum is now at a point where you can have basic conversations, so here is a little demo for you to break.',
'welcome_title' => 'Welcome to Flarum Demo Forum'
];
DB::table('config')->insert(array_map(function($key, $value) {
return compact('key', 'value');
}, array_keys($config), $config));
}
}