A Laravel Wrapper for the Validator.pizza disposable email API.
composer require attla/disposable
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
public function handleEmail(Request $request)
{
$request->validate([
'email' => 'required|email|disposable',
]);
// ...
}
}
$checker = new \Attla\Disposable\Checker;
// Validate Email
$validEmail = $checker->allowedEmail('lucas@octha.com');
// Validate Domain
$validDomain = $checker->allowedDomain('octha.com');
composer test
This package is licensed under the MIT license © Octha.