PHP code example of ashallendesign / laravel-mailboxlayer

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

    

ashallendesign / laravel-mailboxlayer example snippets


use AshAllenDesign\MailboxLayer\Classes\MailboxLayer;

$mailboxLayer = new MailboxLayer('api-key-here');
$validationResult = $mailboxLayer->check('[email protected]');

use AshAllenDesign\MailboxLayer\Classes\MailboxLayer;

$mailboxLayer = new MailboxLayer('api-key-here');
$validationResults = $mailboxLayer->checkMany(['[email protected]', '[email protected]']);
     
use MailboxLayer;
    
return MailboxLayer::check('[email protected]');

use AshAllenDesign\MailboxLayer\Classes\MailboxLayer;

$mailboxLayer = new MailboxLayer('api-key-here');

// Result fetched from the API.
$validationResults = $mailboxLayer->shouldCache()->check('[email protected]');

// Result fetched from the cache.
$validationResults = $mailboxLayer->shouldCache()->check('[email protected]');

use AshAllenDesign\MailboxLayer\Classes\MailboxLayer;

$mailboxLayer = new MailboxLayer('api-key-here');

$validationResults = $mailboxLayer->fresh()->check('[email protected]');

use AshAllenDesign\MailboxLayer\Classes\MailboxLayer;

$mailboxLayer = new MailboxLayer('api-key-here');

$validationResults = $mailboxLayer->withHttps(false)->check('[email protected]');

use AshAllenDesign\MailboxLayer\Classes\MailboxLayer;

$mailboxLayer = new MailboxLayer('api-key-here');

$validationResults = $mailboxLayer->withSmtpCheck(false)->check('[email protected]');
bash
php artisan vendor:publish --provider="AshAllenDesign\MailboxLayer\Providers\MailboxLayerProvider"