2015-01-01 17:47:53 +00:00
|
|
|
<?php
|
|
|
|
|
2015-04-19 08:52:39 +01:00
|
|
|
/*
|
|
|
|
* This file is part of Cachet.
|
|
|
|
*
|
|
|
|
* (c) James Brooks <james@cachethq.io>
|
2015-05-19 10:45:38 +01:00
|
|
|
* (c) Joseph Cohen <joseph.cohen@dinkbit.com>
|
|
|
|
* (c) Graham Campbell <graham@mineuk.com>
|
2015-04-19 08:52:39 +01:00
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
2015-01-01 17:47:53 +00:00
|
|
|
namespace CachetHQ\Cachet\Providers;
|
|
|
|
|
2015-01-17 19:44:39 +00:00
|
|
|
use CachetHQ\Cachet\Console\Commands\FixPermissionsCommand;
|
2015-01-01 17:47:53 +00:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
class ConsoleServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Boot the service provider.
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
2015-03-20 18:30:45 -06:00
|
|
|
//
|
2015-01-01 17:47:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Register the service provider.
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
2015-01-17 19:44:39 +00:00
|
|
|
$this->app->singleton('CachetHQ\Cachet\Console\Commands\FixPermissionsCommand', function ($app) {
|
2015-03-20 18:30:45 -06:00
|
|
|
$storageDirectory = storage_path();
|
|
|
|
$databaseDirectory = base_path('database');
|
2015-01-17 19:44:39 +00:00
|
|
|
$databasePath = $app->config->get('database.connections.sqlite.database');
|
|
|
|
$databaseDefault = $app->config->get('database.default');
|
|
|
|
|
2015-01-17 21:56:01 +00:00
|
|
|
return new FixPermissionsCommand($storageDirectory, $databaseDirectory, $databasePath, $databaseDefault);
|
2015-01-17 19:44:39 +00:00
|
|
|
});
|
2015-01-01 17:47:53 +00:00
|
|
|
}
|
|
|
|
}
|