hedii/ip-checker

Check whether an ip address can be used in a Laravel application

1.0.3 2018-03-05 07:51 UTC

This package is auto-updated.

Last update: 2024-12-18 21:31:47 UTC


README

Build Status

ip-checker

Check whether an ip address can be used in a Laravel application. Receive an email notification when an ip address does not pass the check.

Table of contents

Installation

Install via composer

composer require hedii/ip-checker

Publish and edit the configuration (config/ip-checker.php)

php artisan vendor:publish --provider="Hedii\IpChecker\IpCheckerServiceProvider" --tag="config"

Usage

Manual check

Run the package command manually

php artisan ip:check

Scheduled check

Schedule the package command to check the ip addresses at regular interval.

To check the ip addresses every hour, edit app/Console/Kernel.php

/**
 * Define the application's command schedule.
 *
 * @param \Illuminate\Console\Scheduling\Schedule $schedule
 */
 protected function schedule(Schedule $schedule)
 {
     $schedule->command('ip:check')->hourly();
 }

Testing

composer test

License

hedii/ip-checker is released under the MIT Licence. See the bundled LICENSE file for details.