mirror of
https://github.com/flarum/core.git
synced 2025-01-17 22:29:15 +01:00
Use Laravel's database config.
This commit is contained in:
parent
3fb50f5379
commit
5a98eb0f06
@ -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');
|
||||
|
@ -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();
|
||||
|
@ -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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user