laravel-ready / blacklist-whitelist
Simple domain and email blacklist/whitelist package
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/laravel-ready/blacklist-whitelist
Requires
- php: ^8.1 || ^8.0
- illuminate/support: ^10.0 || ^9.0
Requires (Dev)
- mockery/mockery: ^1.5
- nunomaduro/larastan: ^2.5
- orchestra/testbench: ^8.0
- pestphp/pest: ^1.22
- pestphp/pest-plugin-laravel: ^1.4
- pestphp/pest-plugin-parallel: ^1.2
- phpstan/extension-installer: ^1.2
- phpstan/phpstan: ^1.10
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
README
📂 About
Simple domain and email blacklist/whitelist package...
📦 Installation
Get via composer
composer require laravel-ready/blacklist-whitelist
⚙️ Configs
php artisan vendor:publish --tag=blacklist-whitelist-config
Migrations
# publish migrations php artisan vendor:publish --tag=blacklist-whitelist-migrations # apply migrations php artisan migrate --path=/database/migrations/laravel-ready/blacklist-whitelist
📝 Usage
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@example.com', BlockType::Blacklist); // any subject BlacklistWhitelist::subject('TEST', BlockType::Blacklist); // check subject BlacklistWhitelist::isBlocked('example.com'); // check allowed subject BlacklistWhitelist::isAllowed('example.com');
⚓ Credits
- This project was generated by the packager.