Originally posted @ https://codeanddeploy.com visit and download the sample code: https://codeanddeploy.com/blog/laravel/how-to-get-current-user-location-using-ip-address-in-laravel-8 In this post, I'm sharing how to get the current user location using the IP address in Laravel 8. Usually building a project we need to determine where our users came from so that we have their location so that we have an idea about it. Like if we need to scale our server or business in that location because we have many users from there.

See below sample: Route::get('/user-location', 'UserLocationController@index')->name('user.location.index'); Then check our controller code below: How To Get Current User Location using IP Address in Laravel 8
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners