35 lines
747 B
PHP
35 lines
747 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
use Illuminate\Support\Facades\URL;
|
|
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
|
|
JsonResource::withoutWrapping();
|
|
if (!in_array(config('app.env'), ['local', 'testing'])) {
|
|
URL::forceScheme('https');
|
|
}
|
|
}
|
|
}
|