PHP code example of elbgoods / laravel-trashmail-rule

1. Go to this page and download the library: Download elbgoods/laravel-trashmail-rule 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/ */

    

elbgoods / laravel-trashmail-rule example snippets


use Elbgoods\TrashmailRule\Rules\TrashmailRule;

$rule = new TrashmailRule();

use Elbgoods\TrashmailRule\Rules\TrashmailRule;

$rule = new TrashmailRule(false);
$rule->nullable();

use Elbgoods\TrashmailRule\Facades\Trashmail;

Trashmail::isDisposable('[email protected]');

use Elbgoods\TrashmailRule\Facades\Trashmail;

Trashmail::provider('config')->isDisposable(
    Trashmail::getDomain('[email protected]')
);

use Elbgoods\TrashmailRule\Facades\Trashmail;
use Illuminate\Contracts\Container\Container;
use Elbgoods\TrashmailRule\Contracts\ProviderContract;

Trashmail::extend('custom_provider', static function (Container $app): ProviderContract {
    return new CustomProvider();
});
bash
php artisan vendor:publish --provider="Elbgoods\TrashmailRule\TrashmailRuleServiceProvider" --tag=lang
php artisan vendor:publish --provider="Elbgoods\TrashmailRule\TrashmailRuleServiceProvider" --tag=config