1
0
mirror of https://github.com/flarum/core.git synced 2025-10-22 04:06:37 +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

@@ -6,17 +6,13 @@ use Auth;
use Cookie;
use Config;
use View;
use DB;
class IndexAction extends BaseAction
{
public function handle(Request $request, $params = [])
{
$config = [
'baseURL' => 'http://flarum.dev',
'apiURL' => 'http://flarum.dev/api',
'forumTitle' => Config::get('flarum::forum_title', 'Flarum Demo Forum'),
'welcomeDescription' => 'Flarum is now at a point where you can have basic conversations, so here is a little demo for you to break. <a href="http://demo.flarum.org/#/1/welcome-to-the-first-public-demo-of-flarum">Learn more &raquo;</a>'
];
$config = DB::table('config')->whereIn('key', ['base_url', 'api_url', 'forum_title', 'welcome_title', 'welcome_message'])->lists('value', 'key');
$data = [];
$session = [];
$alert = Session::get('alert');