Sonu
Sonu

Reputation: 301

How to get ip address of a user in laravel 4.2

I am using

$log['ip_address'] = Request::getClientIp();

to get the client ip address but i am not getting the ip address using this.

Is there any other method available to get the user ip address?

Upvotes: 0

Views: 854

Answers (1)

Gulliver Smith
Gulliver Smith

Reputation: 1561

In Laravel 4.2 Request::ip() or Request::ips() will get the IP address of the request.

Upvotes: 1

Related Questions