diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index da868696..47bebb56 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -33,11 +33,9 @@ class AppServiceProvider extends ServiceProvider */ public function boot() { - // LOCAL HTTPS FIX - if (config('app.env') !== 'local') { - URL::forceScheme('https'); - } - // HA PROXY FIX + URL::forceScheme('https'); + + // HA PROXY FIX. App::singleton('clientIp', function () { if (config('app.env') === 'local') { return request()->getClientIp(); @@ -56,7 +54,7 @@ class AppServiceProvider extends ServiceProvider } Carbon::setLocale(config('app.locale')); - // force bootstrap paginator + // Force bootstrap paginator. Paginator::useBootstrap(); if (!app()->runningInConsole()) { @@ -87,11 +85,11 @@ class AppServiceProvider extends ServiceProvider }//end if Blade::directive('svg', function ($arguments) { - // Funky madness to accept multiple arguments into the directive + // Funky madness to accept multiple arguments into the directive. list($path, $class) = array_pad(explode(',', trim($arguments, "() ")), 2, ''); $path = trim($path, "' "); $class = trim($class, "' "); - // Create the dom document as per the other answers + // Create the dom document as per the other answers. $svg = new \DOMDocument(); $svg->load(public_path($path)); $svg->documentElement->setAttribute("class", $class); diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 42218657..a13e106d 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -82,11 +82,11 @@ class RouteServiceProvider extends ServiceProvider try { return ArticleCategory::make($value); } catch (BadMethodCallException | EnumNotRoutableException $e) { - // handle old article route + // Handle old article route. $publishedArticle = Articles::where('id', $value) ->orWhere('slug', $value)->where('status', true)->first(); if ($publishedArticle) { - // redirect permanent, throw redirect exception using send method + // Redirect permanent, throw redirect exception using send method. \redirect(route('club.infos.child', [ 'articleTag' => $publishedArticle->type, 'publishedArticle' => $publishedArticle diff --git a/routes/web-bo.php b/routes/web-bo.php index 4fde9303..c8f4f1ab 100644 --- a/routes/web-bo.php +++ b/routes/web-bo.php @@ -78,7 +78,7 @@ Route::prefix('bo') ->middleware('xss:content'); Route::resource('product-pictograms', ProductPictogramsController::class); // Disabled product sliders Cf tasks Le Gaulois #PSP - // Route::resource('product-slider-pictures', 'ProductSliderPicturesController'); + // Route::resource('product-slider-pictures', 'ProductSliderPicturesController');. Route::resource('products', ProductsController::class)->except(['show']) ->withoutMiddleware('xss') ->middleware('xss:preparation_advice,ingredients,tips');