attla / disposable
A PHP Laravel to validate disposable emails.
Fund package maintenance!
attla
dev-main
2022-03-23 22:58 UTC
Requires
- php: ^7.2|^8.0
- guzzlehttp/guzzle: ^6.3|^7.0
- illuminate/support: ^5.5|^6.0|^7.0|^8.0|^9.0
Requires (Dev)
- phpunit/phpunit: ^8.0|^9.0
- symfony/phpunit-bridge: ^5.1
This package is auto-updated.
Last update: 2024-10-24 05:00:04 UTC
README
A Laravel Wrapper for the Validator.pizza disposable email API.
Installation
composer require attla/disposable
Usage
Controller Validation
namespace App\Http\Controllers; use Illuminate\Http\Request; class HomeController extends Controller { public function handleEmail(Request $request) { $request->validate([ 'email' => 'required|email|disposable', ]); // ... } }
Standalone
$checker = new \Attla\Disposable\Checker; // Validate Email $validEmail = $checker->allowedEmail('lucas@octha.com'); // Validate Domain $validDomain = $checker->allowedDomain('octha.com');
Testing
composer test
License
This package is licensed under the MIT license © Octha.