PHP code example of madeitbelgium / laravel-email-domain-validation

1. Go to this page and download the library: Download madeitbelgium/laravel-email-domain-validation library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

madeitbelgium / laravel-email-domain-validation example snippets


composer 

"madeitbelgium/laravel-email-domain-validation": "1.*"

MadeITBelgium\EmailDomainValidation\EmailDomainServiceProvider::class,

'EmailDomainValidation' => MadeITBelgium\EmailDomainValidation\EmailDomainFacade::class,

$emailDomain = new EmailDomain('[email protected]', ['madeit.be'], ['tpweb.org']);
$emailDomain->isEmailValid() //Checks if the given e-mail address is valid
$emailDomain->areAllowedDomainsValid(); //Check if the given allowed domains are valid
$emailDomain->areNotAllowedDomainsValid()


$emailDomain->isEmailAllowed() //Check if the email address is allowed.
$emailDomain->isEmailAllowed('[email protected]', ['madeit.be'], ['example.com']));

public function store(Request $request) {
    $this->validate($request, ['email' => '