PHP code example of michaelcrowcroft / laravel-cloud-ip
1. Go to this page and download the library: Download michaelcrowcroft/laravel-cloud-ip library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
michaelcrowcroft / laravel-cloud-ip example snippets
bash
php artisan migrate
bash
php artisan cloudip:get
php
public function cloudIP()
{
public static function HasIP($ip): self|null
{
$ip = IP::parse($ip);
return CloudIP::where('first_ip', '<=', $ip->toLong())
->where('last_ip', '>=', $ip->toLong())
->first();
}
}
php
CloudIP::hasIP('3.2.34.0')->get();
php
// In your app/Console/Kernel.php file
protected function schedule(Schedule $schedule): void
{
$schedule->command('cloudip:get')->weekly();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.