Skip to content
Snippets Groups Projects
Commit 1d8ef87c authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Fixed Quicktip URL for tips route

parent 279acbb0
Branches
No related tags found
1 merge request!1474Development
...@@ -10,8 +10,6 @@ use Illuminate\Support\Facades\Redis; ...@@ -10,8 +10,6 @@ use Illuminate\Support\Facades\Redis;
use LaravelLocalization; use LaravelLocalization;
use View; use View;
const TIP_SERVER = 'http://metager3.de:63825/tips.xml';
class MetaGerSearch extends Controller class MetaGerSearch extends Controller
{ {
public function search(Request $request, MetaGer $metager) public function search(Request $request, MetaGer $metager)
...@@ -209,7 +207,13 @@ class MetaGerSearch extends Controller ...@@ -209,7 +207,13 @@ class MetaGerSearch extends Controller
public function tips(Request $request) public function tips(Request $request)
{ {
$tips_text = file_get_contents(TIP_SERVER); $tipserver = '';
if (env('APP_ENV') === "development") {
$tipserver = "https://dev.quicktips.metager.de/1.1/tips.xml";
} else {
$tipserver = "https://quicktips.metager.de/1.1/tips.xml";
}
$tips_text = file_get_contents($tipserver);
$tips = []; $tips = [];
try { try {
$tips_xml = simplexml_load_string($tips_text); $tips_xml = simplexml_load_string($tips_text);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment