You can use request()->ip();

You can also use : Request::ip() but in this case, we have to call namespace like this: Use Illuminate\Http\Request;

BY Best Interview Question ON 26 May 2020