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