ipinfo / laravel Goto Github PK
View Code? Open in Web Editor NEWOfficial Laravel client library for IPinfo API (IP geolocation and other types of IP data)
Home Page: https://ipinfo.io
License: Apache License 2.0
Official Laravel client library for IPinfo API (IP geolocation and other types of IP data)
Home Page: https://ipinfo.io
License: Apache License 2.0
Make sure the cache key contains a number to indicate the version of the cached data. Data changes that change what's expected in cached data require a version change.
Hello,
is there any support for laravel 9 coming soon?
Greetings
Add an optional IP selection handler to the SDK client initialization step which accepts the request context and expects returning an IP.
The default handler, if no handler is specified by the user, will simply return the IP attached to the request object.
An additional handler should be available within the library, which looks into the X-Forwarded-For
header and gets the first IP in the list if it exists, falling back to the IP attached to the request if the header isn't available. This is an implementation that users can optionally use instead of making their own.
Does not support Laravel v 6.x ๐ญ
I would like the option to easily handle exceptions. Sometimes ipinfo throws a random exception (when the service is temporarily unavailable for example). But it results immediately in production a 500 error.
I would like the option to set a parameter that exceptions can be ignored and logged. So the application still continues working. And that $request->ipinfo just returns an empty object.
Currently there is no easy way to handle those exceptions.
count(): Parameter must be an array or an object that implements Countable
details:
https://flareapp.io/share/17xZ9amb#F27
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires ipinfo/ipinfolaravel ^2.4 -> satisfiable by ipinfo/ipinfolaravel[v2.4.0].
- ipinfo/ipinfolaravel v2.4.0 requires illuminate/support >=5, <10 -> found illuminate/support[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.4] but these were not loaded, likely because it conflicts with another require.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require ipinfo/ipinfolaravel:*" to figure out if any version is installable, or "composer require ipinfo/ipinfolaravel:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
following instructions from #40 (comment) causes even more errors to throw
Hi, i get this error not every tme
count(): Parameter must be an array or an object that implements Countable
Any idea?
Thanks.
With: $request->ipinfo->country I get the details of the server not of the user.
How do I pass $request->getClientIp(); to ipinfo?
Your requirements could not be resolved to an installable set of packages.
Problem 1
- sabre/cache[1.0.0, ..., 1.0.4] require psr/simple-cache ^1.0 -> found psr/simple-cache[1.0.0, 1.0.1] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
- sabre/cache 1.0.2 requires php ^7.1 -> your php version (8.0.20) does not satisfy that requirement.
- ipinfo/ipinfolaravel v2.4.0 requires ipinfo/ipinfo ^2.3.1 -> satisfiable by ipinfo/ipinfo[v2.3.1, 2.3.x-dev].
- ipinfo/ipinfo[v2.3.1, ..., 2.3.x-dev] require sabre/cache ^1.0 -> satisfiable by sabre/cache[1.0.0, ..., 1.0.4].
- Root composer.json requires ipinfo/ipinfolaravel ^2.4 -> satisfiable by ipinfo/ipinfolaravel[v2.4.0].
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require ipinfo/ipinfolaravel:*" to figure out if any version is installable, or "composer require ipinfo/ipinfolaravel:^2.1" if you know which you need.
Cannot be used with Laravel 11
Problem 1
- ipinfo/ipinfolaravel v1.0.0 requires illuminate/support ~5 -> found illuminate/support[v5.0.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require.
- ipinfo/ipinfolaravel[v2.0.0, ..., v2.2.0] require illuminate/support >=5, <9 -> found illuminate/support[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
- ipinfo/ipinfolaravel[v2.3.0, ..., v2.4.0] require illuminate/support >=5, <10 -> found illuminate/support[v5.0.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0-beta.1, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require.
- ipinfo/ipinfolaravel[v2.5.0, ..., v2.6.0] require illuminate/support >=7 <11 -> found illuminate/support[v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0-beta.1, ..., v9.52.16, v10.0.0, ..., v10.48.4] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires ipinfo/ipinfolaravel * -> satisfiable by ipinfo/ipinfolaravel[v1.0.0, v2.0.0, ..., v2.6.0].
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.