1
0
mirror of https://github.com/flarum/core.git synced 2025-10-14 08:24:28 +02:00

Restructure Flarum\Database namespace

This commit is contained in:
Franz Liedke
2017-06-24 11:34:29 +02:00
parent c6985ae31c
commit d897839097
5 changed files with 35 additions and 12 deletions

View File

@@ -0,0 +1,32 @@
<?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flarum\Database;
use Flarum\Foundation\AbstractServiceProvider;
use Flarum\Foundation\Application;
class MigrationServiceProvider extends AbstractServiceProvider
{
/**
* {@inheritdoc}
*/
public function register()
{
$this->app->singleton('Flarum\Database\MigrationRepositoryInterface', function ($app) {
return new DatabaseMigrationRepository($app['db'], 'migrations');
});
$this->app->bind(MigrationCreator::class, function (Application $app) {
return new MigrationCreator($app->make('Illuminate\Filesystem\Filesystem'), $app->basePath());
});
}
}