Laravel
You can call our API using our Laravel package.
Last updated
Was this helpful?
You can call our API using our Laravel package.
Last updated
Was this helpful?
You can install the package via composer:
You can publish the config file with:
Or create the config file config/trustip.php and add this code:
You can use it as a dependency injection in Route or Controller
Or by using Trustip
facade :
After that, you should get an output similar to this:
If there's an error, the output will be similar to this:
You can also use the isIpProxy
helper function in your controllers or other classes:
The
isIpProxy
will return false if the check method throws an exception or returns an error
Trustip\Trustip\Exceptions\MissingApiKeyException
is thrown if the api key is not found in the env file.
Trustip\Trustip\Exceptions\InvalidIpAddressException
is thrown if the ip address passed to the check method is invalid
You need to set TRUSTIP_API_KEY
in your .env
file before using the package. You can get the API key from
If the IP is proxy the is_proxy
will be true
if not it will be false
you can read more at
Check all errors on .
If you discover any security related issues, please email instead of using the issue tracker.
The MIT License (MIT). Please see for more information.