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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners