ldc-crm/app/Providers/AppServiceProvider.php

36 lines
747 B
PHP
Raw Normal View History

2020-12-01 17:02:10 +01:00
<?php
namespace App\Providers;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Facades\URL;
2020-12-01 17:02:10 +01:00
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//! Important pourra etre retiré quand la V1 sera supprimé
// empeche l'encapsulation dans data
2020-12-01 17:02:10 +01:00
JsonResource::withoutWrapping();
if (!in_array(config('app.env'), ['local', 'testing'])) {
URL::forceScheme('https');
2020-12-01 17:02:10 +01:00
}
}
}