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:
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user