TIF_E41200744/app/Providers/AppServiceProvider.php

36 lines
643 B
PHP

<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
if (env('APP_ENV') != 'local') {
$this->app['request']->server->set('HTTPS', true);
}
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
if (env('APP_ENV') != 'local') {
URL::forceScheme('https');
}
}
}