get user ip laravel 1

get user ip laravel

To get current user ip in php, laravel
  
\Request::ip();

or 
  
$request->ip();

Here is what the above code is Doing:
1. We are using the Request facade to get the current request.
2. We are using the ip() method to get the current user’s IP address.

Similar Posts