Skip to content

Commit 056e77c

Browse files
committed
Update readme
1 parent 2ca4374 commit 056e77c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ protected $middleware = [
4444

4545
```php
4646
Route::get('/', function () {
47-
$location = "The IP address " . request()->get('abstract-ip-geolocation')['ip_address'];
47+
$ip = request()->get('abstract-ip-geolocation')['ip_address']
48+
// Or
49+
$ip = session()->get('abstract-ip-geolocation')['ip_address']
50+
$location = "The IP address " . $ip;
4851
return view('index', ['location' => $location]);
4952
});
5053
```

0 commit comments

Comments
 (0)