Merge branch 'activity-route-log' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into development

This commit is contained in:
edmondlang
2023-02-16 19:39:29 +08:00
+4 -4
View File
@@ -25,11 +25,11 @@ class WebRouteLogs
$request_method = $request->method();
$platform = $request->header('sec-ch-ua-platform');
$browser = Str::after($request->header('sec-ch-ua'), 'Not?A_Brand";v="8", "Chromium";v="108", "');
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$ip_address"));
$longitude = $geo["geoplugin_longitude"];
$latitude = $geo["geoplugin_latitude"];
$geo = unserialize(file_get_contents("http://www.geoplugin.net/php.gp?ip=$ip_address")) ?? null;
$longitude = $geo ? $geo["geoplugin_longitude"] : '';
$latitude = $geo ? $geo["geoplugin_latitude"] : '';
$countryName = $geo ? $geo["geoplugin_countryName"] : '';
$last_page = url()->previous();
$countryName = $geo["geoplugin_countryName"];
$route_log = [
'user_id' => Auth::user() ? Auth::user()->id : 0,