https://github.com/mojoblanco/domainos
A laravel package for blacklisting or whitelisting specific email providers or domains
https://github.com/mojoblanco/domainos
blacklist domain email laravel security whitelist
Last synced: 6 months ago
JSON representation
A laravel package for blacklisting or whitelisting specific email providers or domains
- Host: GitHub
- URL: https://github.com/mojoblanco/domainos
- Owner: mojoblanco
- License: mit
- Created: 2017-05-07T12:19:56.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-05T12:37:27.000Z (almost 8 years ago)
- Last Synced: 2025-11-27T15:28:23.894Z (7 months ago)
- Topics: blacklist, domain, email, laravel, security, whitelist
- Language: PHP
- Homepage:
- Size: 10.7 KB
- Stars: 22
- Watchers: 2
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Domainos
[](https://packagist.org/packages/mojoblanco/domainos)
[](https://packagist.org/packages/mojoblanco/domainos)
[](https://packagist.org/packages/mojoblanco/domainos)
[](https://packagist.org/packages/mojoblanco/domainos)
A laravel package for allowing or blocking specific email domains
## Installation
Open your terminal or command prompt, go to the root directory of your Laravel project, then follow the following steps.
1. Run
```
composer require mojoblanco/domainos
```
2. Add the provider to the providers array in config/app.php
_If you are using laravel 5.5, you don't need to place the code below_
```
Mojoblanco\Domainos\DomainosServiceProvider::class,
```
3. Run ```composer dump-autoload```
4. Publish the config file
```
php artisan vendor:publish --provider="Mojoblanco\Domainos\DomainosServiceProvider" --tag="config"
```
## Usage
1. Go to the `config/domainos.php` file and customize it.
There are two options;
`block` is for blacklisting domains,
`allow` is for whitelisting.
2. Go to the validation of the email address and add the following
```
'email' => 'domainos:allow'
```
3. Test the validation
### Notice
This package can be very useful when you want to prevent or allow specific email addresses during user registration.
### How can you thank me?
You can like this repo, follow me on [github](https://github.com/mojoblanco) and [twitter](https://twitter.com/themojoblanco)
Thanks.