From 6d1a8419d0bb7c42a0cfded79ff2a7e5ad9654b2 Mon Sep 17 00:00:00 2001 From: Dominik Hebeler <dominik@suma-ev.de> Date: Fri, 11 Oct 2019 12:32:27 +0200 Subject: [PATCH] using correct quicktip URL per environment --- app/Models/Quicktips/Quicktips.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Models/Quicktips/Quicktips.php b/app/Models/Quicktips/Quicktips.php index 1b7b7e046..2652581fe 100644 --- a/app/Models/Quicktips/Quicktips.php +++ b/app/Models/Quicktips/Quicktips.php @@ -11,7 +11,7 @@ class Quicktips { use DispatchesJobs; - const QUICKTIP_URL = "http://localhost:63825/1.1/quicktips.xml"; + private $QUICKTIP_URL = "/1.1/quicktips.xml"; const QUICKTIP_NAME = "quicktips"; const CACHE_DURATION = 60; @@ -19,6 +19,11 @@ class Quicktips public function __construct($search, $locale, $max_time) { + if (env("APP_ENV") === "production") { + $this->QUICKTIP_URL = "https://quicktips.metager.de" . $this->QUICKTIP_URL; + } else { + $this->QUICKTIP_URL = "https://dev.quicktips.metager.de" . $this->QUICKTIP_URL; + } $this->startSearch($search, $locale, $max_time); } -- GitLab