How to get Client Ip Address in Laravel 5.2 with example?

How to get Client Ip Address in Laravel 5.2 with example?

In this tutorial, i will tell you how to get client ip address in Laravel 5.2

Sometime you need to track the ip address of the visitors visiting on your website.

In PHP you use super global variable $_SERVER to get ip address but in Laravel you will get ip address in following way :

\Request::ip();

OR

\Request::getClientIp(true);

Phone: (+91) 8800417876
Noida, 201301