From 5a98eb0f06d6ed1f5c22967413061ff8b078c64e Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 20 Dec 2014 17:19:00 +1030 Subject: [PATCH] Use Laravel's database config. --- src/Flarum/Core/CoreServiceProvider.php | 2 -- src/Flarum/Core/Entity.php | 5 ----- src/config/config.php | 10 ---------- 3 files changed, 17 deletions(-) diff --git a/src/Flarum/Core/CoreServiceProvider.php b/src/Flarum/Core/CoreServiceProvider.php index a0c331937..fb8a0e64e 100644 --- a/src/Flarum/Core/CoreServiceProvider.php +++ b/src/Flarum/Core/CoreServiceProvider.php @@ -22,8 +22,6 @@ class CoreServiceProvider extends ServiceProvider { $this->package('flarum/core', 'flarum'); - Config::set('database.connections.flarum', Config::get('flarum::database')); - $this->app->make('validator')->extend('username', 'Flarum\Core\Users\UsernameValidator@validate'); Event::listen('Flarum.Core.*', 'Flarum\Core\Listeners\DiscussionMetadataUpdater'); diff --git a/src/Flarum/Core/Entity.php b/src/Flarum/Core/Entity.php index 8f5bb0b43..a76613323 100755 --- a/src/Flarum/Core/Entity.php +++ b/src/Flarum/Core/Entity.php @@ -26,11 +26,6 @@ class Entity extends Eloquent $this->validator = $validator ?: \App::make('validator'); } - public function getConnection() - { - return static::resolveConnection('flarum'); - } - public function valid() { return $this->getValidator()->passes(); diff --git a/src/config/config.php b/src/config/config.php index 560bfaa16..d0b19a548 100755 --- a/src/config/config.php +++ b/src/config/config.php @@ -4,16 +4,6 @@ return array( 'installed' => true, 'title' => 'Flarum Prototype Forum', - 'database' => array( - 'driver' => 'mysql', - 'host' => 'localhost', - 'database' => 'flarum', - 'username' => '', - 'password' => '', - 'charset' => 'utf8', - 'collation' => 'utf8_unicode_ci', - 'prefix' => '', - ), 'route_rules' => array( // 'prefix' => 'blog',