36 lines
669 B
PHP
36 lines
669 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\Range;
|
|
use Illuminate\Support\Facades\View;
|
|
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()
|
|
{
|
|
if (config('app.env') !== 'local') {
|
|
\URL::forceScheme('https');
|
|
}
|
|
|
|
// on partage les ranges (gammes produit)
|
|
$ranges = Range::all();
|
|
View::share('ranges', $ranges);
|
|
}
|
|
}
|