A few useful reusable support package for Laravelj
mhassan654/license-support is a Laravel package for a few useful reusable support package for laravelj.
It currently has 0 GitHub stars and 11 downloads on Packagist (latest version v1.0.1).
Install it with composer require mhassan654/license-support.
Discover more Laravel packages by mhassan654
or browse all Laravel packages to compare alternatives.
Last updated
Support collection for Laravel. This package is standalone and does not require external packages.
Install via Composer:
composer require mhassan654/license-support
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 |
getLocalhostPublicIp method is useful for checking if the client is from localhost. Uses https://api.ipify.org/?format=json endpoint.Request::ip() method but this method is cover all cases. For example cloudflare, nginx, etc. Also see this stackoverflow question.