mojoblanco/domainos
| Install | |
|---|---|
composer require mojoblanco/domainos |
|
| Latest Version: | 1.1.2 |
| PHP: | ~5.6|~7.0 |
| License: | MIT |
| Last Updated: | Aug 5, 2018 |
| Links: | GitHub · Packagist |
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.
-
Run
composer require mojoblanco/domainos -
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, -
Run
composer dump-autoload -
Publish the config file
php artisan vendor:publish --provider="Mojoblanco\Domainos\DomainosServiceProvider" --tag="config"
Usage
-
Go to the
config/domainos.phpfile and customize it. There are two options;blockis for blacklisting domains,allowis for whitelisting. -
Go to the validation of the email address and add the following
'email' => 'domainos:allow'
- 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 and twitter Thanks.
Related Packages
Rinvex Authy is a simple wrapper for Authy TOTP, the best rated Two-Factor Authe...
Light-weight role-based permissions for Laravel 5 built in Auth system.