mhassan654 / license-support
A few useful reusable support package for Laravelj
Installs: 11
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mhassan654/license-support
Requires
- php: ^8.0.2
- illuminate/support: ^8.0
This package is auto-updated.
Last update: 2025-10-18 20:32:56 UTC
README
Support collection for Laravel. This package is standalone and does not require external packages.
Install
Install via Composer:
composer require mhassan654/license-support
Support Classes
IpSupport
Contains methods for working with IP addresses.
use Mhassan654\LicenseSupport\Support\IpSupport;
| Method | Description | Result |
|---|---|---|
| isLocalhost | Check client is from localhost | boolean |
| getLocalhostPublicIp | Get client public IP address if it is localhost | null or string |
| getIP | Get client real IP address | string |
- The
getLocalhostPublicIpmethod is useful for checking if the client is from localhost. Uses https://api.ipify.org/?format=json endpoint. - 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.