I am trying to get the client\'s IP address in Laravel.
It is easy to get a client\'s IP in PHP by using $_SERVER[\"REMOTE_ADDR\"]. It is working fine
$_SERVER[\"REMOTE_ADDR\"]
If you worry about getting the IP address but do not need or want to use any Laravel functionality, you can use just php:
PHP < 5.3.0 $localIP = getHostByName(php_uname('n'));
PHP >= 5.3.0 $localIP = getHostByName(getHostName());
as answered in this thread: PHP how to get local IP of system