This is my very first package that I have to publish. The basic function is to whatever check IP Address of client is being blacklist/whitelist to access the page.
You can install the package via composer:
composer require enkuldes/listing-ip-address
Export the config file with:
php artisan vendor:publish --provider="EnKuldes\ListingIPAddress\ListingIPAddressServiceProvider"
And after that add this following line on .ENV
file:
# List of IP Address separated by comma (,)
LIST_IP=192.168.0.5,10.194.17.10,127.0.0.1
# How middleware React to List of IP. Either blacklist or whitelist. Default BlackList.
BEHAVIOR=whitelist
Add middleware to route file, example:
// Add middleware to single route
Route::get('/', 'HomeController@index')->middleware('listing-ip-address');
// Add middleware to group route
Route::middleware(['listing-ip-address'])->group(function () {
Route::get('/', 'HomeController@index');
};
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
This package was generated using the Laravel Package Boilerplate.