2020-10-30 17:26:00 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
2021-03-17 09:28:02 +01:00
|
|
|
use App\Models\Range;
|
2021-03-05 11:37:13 +01:00
|
|
|
use Illuminate\Support\Facades\View;
|
2020-10-30 17:26:00 +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()
|
|
|
|
|
{
|
2021-03-23 10:23:05 +01:00
|
|
|
if (config('app.env') !== 'local') {
|
|
|
|
|
\URL::forceScheme('https');
|
|
|
|
|
}
|
2021-03-18 08:40:20 +01:00
|
|
|
|
2021-03-15 17:44:35 +01:00
|
|
|
// on partage les ranges (gammes produit)
|
2021-03-17 09:28:02 +01:00
|
|
|
$ranges = Range::all();
|
2021-03-15 17:44:35 +01:00
|
|
|
View::share('ranges', $ranges);
|
2020-10-30 17:26:00 +01:00
|
|
|
}
|
|
|
|
|
}
|