How to Get IP Address in Laravel?

There are few different methods using which you can retrive client ip address.

# Example-1: Getting ip address in controller
$clientIP = request()->ip();   

# Example:2: Getting ip in other classes
$clientIP = Request::ip()
$clientIP = Request::getClientIp(true);

# Example-3: Getting ip in blade view
{{ Request::ip() }}