mirror of
https://github.com/flarum/core.git
synced 2025-01-18 06:38:25 +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');
|
$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');
|
$this->app->make('validator')->extend('username', 'Flarum\Core\Users\UsernameValidator@validate');
|
||||||
|
|
||||||
Event::listen('Flarum.Core.*', 'Flarum\Core\Listeners\DiscussionMetadataUpdater');
|
Event::listen('Flarum.Core.*', 'Flarum\Core\Listeners\DiscussionMetadataUpdater');
|
||||||
|
@ -26,11 +26,6 @@ class Entity extends Eloquent
|
|||||||
$this->validator = $validator ?: \App::make('validator');
|
$this->validator = $validator ?: \App::make('validator');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getConnection()
|
|
||||||
{
|
|
||||||
return static::resolveConnection('flarum');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function valid()
|
public function valid()
|
||||||
{
|
{
|
||||||
return $this->getValidator()->passes();
|
return $this->getValidator()->passes();
|
||||||
|
@ -4,16 +4,6 @@ return array(
|
|||||||
|
|
||||||
'installed' => true,
|
'installed' => true,
|
||||||
'title' => 'Flarum Prototype Forum',
|
'title' => 'Flarum Prototype Forum',
|
||||||
'database' => array(
|
|
||||||
'driver' => 'mysql',
|
|
||||||
'host' => 'localhost',
|
|
||||||
'database' => 'flarum',
|
|
||||||
'username' => '',
|
|
||||||
'password' => '',
|
|
||||||
'charset' => 'utf8',
|
|
||||||
'collation' => 'utf8_unicode_ci',
|
|
||||||
'prefix' => '',
|
|
||||||
),
|
|
||||||
|
|
||||||
'route_rules' => array(
|
'route_rules' => array(
|
||||||
// 'prefix' => 'blog',
|
// 'prefix' => 'blog',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user