Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #47 from tanmuhittin/patch-1
Browse files Browse the repository at this point in the history
REMOTE_ADDR is not defined on phpunit
  • Loading branch information
aschmelyun committed May 30, 2019
2 parents e9ac39f + 3f71c04 commit 5ca373c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LarametricsRouteServiceProvider.php
Expand Up @@ -61,7 +61,7 @@ public function boot()
$larametricsRequest = LarametricsRequest::create([
'method' => $routeMatched->request->getMethod(),
'uri' => $routeMatched->request->getRequestUri(),
'ip' => $_SERVER['REMOTE_ADDR'],
'ip' => $routeMatched->request->ip(),
'headers' => json_encode($routeMatched->request->header()),
'start_time' => LARAVEL_START,
'end_time' => microtime(true)
Expand Down

0 comments on commit 5ca373c

Please sign in to comment.