mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 13:38:20 +01:00
34 lines
1005 B
PHP
34 lines
1005 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of Cachet.
|
|
*
|
|
* (c) Alt Three Services Limited
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace CachetHQ\Cachet\Providers;
|
|
|
|
use CachetHQ\Cachet\Console\Commands\FixPermissionsCommand;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class ConsoleServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register the service provider.
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->app->singleton('CachetHQ\Cachet\Console\Commands\FixPermissionsCommand', function ($app) {
|
|
$storageDirectory = storage_path();
|
|
$databaseDirectory = base_path('database');
|
|
$databasePath = $app->config->get('database.connections.sqlite.database');
|
|
$databaseDefault = $app->config->get('database.default');
|
|
|
|
return new FixPermissionsCommand($storageDirectory, $databaseDirectory, $databasePath, $databaseDefault);
|
|
});
|
|
}
|
|
}
|