Simple domain and email blacklist/whitelist package...
Get via composer
composer require laravel-ready/blacklist-whitelist
php artisan vendor:publish --tag=blacklist-whitelist-config
# publish migrations
php artisan vendor:publish --tag=blacklist-whitelist-migrations
# apply migrations
php artisan migrate --path=/database/migrations/laravel-ready/blacklist-whitelist
use LaravelReady\BlacklistWhitelist\Enums\BlockType;
use LaravelReady\BlacklistWhitelist\BlacklistWhitelist;
// add domain to blacklist or whitelist
BlacklistWhitelist::subject('example.com', BlockType::Blacklist);
BlacklistWhitelist::subject('example.com', BlockType::Whitelist);
// email example
BlacklistWhitelist::subject('[email protected]', BlockType::Blacklist);
// any subject
BlacklistWhitelist::subject('TEST', BlockType::Blacklist);
// check subject
BlacklistWhitelist::isBlocked('example.com');
// check allowed subject
BlacklistWhitelist::isAllowed('example.com');
- This project was generated by the packager.