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
|
|
|
|
*
|
2016-10-04 23:52:15 -05:00
|
|
|
* This software may be modified and distributed under the terms of the
|
|
|
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
|
|
*
|
|
|
|
* See the LICENSE file for details.
|
2016-05-20 05:41:23 -05:00
|
|
|
*/
|
|
|
|
|
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-08-29 12:21:40 -05:00
|
|
|
use URL;
|
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-08-29 12:21:40 -05:00
|
|
|
|
|
|
|
// force root URL.
|
|
|
|
$forcedUrl = env('APP_FORCE_ROOT', '');
|
|
|
|
if (strlen($forcedUrl) > 0) {
|
|
|
|
URL::forceRootUrl($forcedUrl);
|
|
|
|
}
|
|
|
|
|
2016-05-04 15:09:42 -05:00
|
|
|
// force https urls
|
|
|
|
if (env('APP_FORCE_SSL', false)) {
|
2016-08-29 12:21:40 -05:00
|
|
|
URL::forceSchema('https');
|
2016-05-04 15:09:42 -05:00
|
|
|
}
|
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()
|
|
|
|
{
|
|
|
|
}
|
2015-02-05 21:39:52 -06:00
|
|
|
}
|