https://github.com/attla/disposable
🧼 A PHP Laravel to validate disposable emails
https://github.com/attla/disposable
attla disposable disposable-email laravel
Last synced: 3 months ago
JSON representation
🧼 A PHP Laravel to validate disposable emails
- Host: GitHub
- URL: https://github.com/attla/disposable
- Owner: attla
- License: mit
- Created: 2022-03-23T20:08:55.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-23T22:58:27.000Z (about 3 years ago)
- Last Synced: 2025-01-20T13:31:32.890Z (4 months ago)
- Topics: attla, disposable, disposable-email, laravel
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Attla disposable email checker
A Laravel Wrapper for the [Validator.pizza](https://www.validator.pizza) disposable email API.
## Installation
```bash
composer require attla/disposable
```## Usage
#### Controller Validation
```php
namespace App\Http\Controllers;use Illuminate\Http\Request;
class HomeController extends Controller
{
public function handleEmail(Request $request)
{
$request->validate([
'email' => 'required|email|disposable',
]);// ...
}
}
```#### Standalone
```php
$checker = new \Attla\Disposable\Checker;// Validate Email
$validEmail = $checker->allowedEmail('[email protected]');// Validate Domain
$validDomain = $checker->allowedDomain('octha.com');
```### Testing
```bash
composer test
```## License
This package is licensed under the [MIT license](LICENSE) © [Octha](https://octha.com).