mafortis
mafortis

Reputation: 7128

Blocking countries IP to access laravel

How can i limit my website visitors to only one country in laravel?

logic

Only one country users (ip's) can visit my website rest of the world can't.

Question

What is the best approach for this?

Upvotes: 1

Views: 3315

Answers (1)

Alejandro García
Alejandro García

Reputation: 168

You can use this package: GeoIp

I suggest you could write your logic using the package inside a middleware, and wrap all your routes with it.

Upvotes: 2

Related Questions