2016-01-08 09:00:07 -06:00
|
|
|
<?php
|
2016-05-20 05:41:23 -05:00
|
|
|
/**
|
|
|
|
* AppServiceProvider.php
|
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
|
|
*
|
|
|
|
* This software may be modified and distributed under the terms
|
|
|
|
* of the MIT license. See the LICENSE file for details.
|
|
|
|
*/
|
|
|
|
|
2016-02-05 05:08:25 -06:00
|
|
|
declare(strict_types = 1);
|
2016-01-08 09:00:07 -06:00
|
|
|
|
|
|
|
namespace FireflyIII\Providers;
|
2015-02-05 21:39:52 -06:00
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
2016-04-08 07:44:53 -05:00
|
|
|
use Log;
|
2016-04-25 11:43:09 -05:00
|
|
|
|
2016-01-09 01:20:55 -06:00
|
|
|
/**
|
|
|
|
* Class AppServiceProvider
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Providers
|
|
|
|
*/
|
2015-02-11 00:35:10 -06:00
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
2016-05-04 15:09:42 -05:00
|
|
|
// force https urls
|
|
|
|
if (env('APP_FORCE_SSL', false)) {
|
|
|
|
\URL::forceSchema('https');
|
|
|
|
}
|
2015-02-11 00:35:10 -06:00
|
|
|
}
|
2015-02-05 21:39:52 -06:00
|
|
|
|
2015-02-11 00:35:10 -06:00
|
|
|
/**
|
|
|
|
* Register any application services.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
2016-04-08 07:44:53 -05:00
|
|
|
// make sure the logger doesn't log everything when it doesn't need to.
|
|
|
|
$monolog = Log::getMonolog();
|
|
|
|
foreach ($monolog->getHandlers() as $handler) {
|
2016-04-26 14:40:15 -05:00
|
|
|
$handler->setLevel(config('app.log-level'));
|
2016-04-08 07:44:53 -05:00
|
|
|
}
|
2015-02-11 00:35:10 -06:00
|
|
|
}
|
2015-02-05 21:39:52 -06:00
|
|
|
}
|