laravel-ready / ultimate-support
A few useful reusable support package for Laravel
Installs: 3 913
Dependents: 4
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
Open Issues: 0
Requires
- php: ^8.2 || ^8.1 || ^8.0
- illuminate/support: ^11.8 || ^10.0 || ^9.0
Requires (Dev)
- mockery/mockery: ^1.6.12
- orchestra/testbench: ^v7.42.0
- phpunit/phpunit: ^10.5.20
README
Support collection for Laravel. This package is standalone and does not require external packages.
Install
Install via Composer:
composer require laravel-ready/ultimate-support
Publish Config
php artisan vendor:publish --tag=ultimate-support-config
Support Classes
IpSupport
Contains methods for working with IP addresses.
use LaravelReady\UltimateSupport\Supports\IpSupport;
getIpAddress Result
[ "is_local" => true, // is client from localhost "base_ip" => "127.0.0.1", // laravel's request()->ip() "ip_address" => "111.111.111.111", // real client ip ]
Warning
getPublicIp
is uses ipify.org service and caching results for 1 day.
Note In laravel native way you can use
Request::ip()
method but this method is cover all cases. For example cloudflare, nginx, etc. Also see this stackoverflow question.