Helper

Laravel Helper

request()

Function Example Description
request()->ip() 172.18.0.1 Get request ip
request()->ips() [172.18.0.1] Get request ip array list
request()->getClientIp() 172.18.0.1 Get request client real ip
request()->getClientIps() [172.18.0.1] Get request client real ip array list

request()->server()

Function Example Description
request()->server(‘HTTP_REFERER’) https://www.google.com/ Get request referer url

Reference