2017 © Pedro Peláez
 

library laravel-validator-pizza

A Laravel Wrapper for the laravel.pizza disposable email API

image

romanzipp/laravel-validator-pizza

A Laravel Wrapper for the laravel.pizza disposable email API

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 11 % Grown

The README.md

⚠️ This package has been renamed

You can find the new project at romanzipp/Laravel-MailCheck. This repository will not get any updates anymore., (*1)

Laravel Validator.Pizza

Latest Stable Version Total Downloads License GitHub Build Status, (*2)

A Laravel Wrapper for the Validator.pizza disposable email API made by @tompec., (*3)

Features

  • Query the Validator.Pizza API for disposable Emails & Domains
  • Cache responses
  • Store requested domains in database

Installation

composer require romanzipp/laravel-validator-pizza

Configuration

Copy configuration to your project:, (*4)

php artisan vendor:publish --provider="romanzipp\ValidatorPizza\Providers\ValidatorPizzaProvider"

Run the migration:, (*5)

php artisan migrate

Change the config to your desired settings:, (*6)

return [

    // Database storage enabled
    'store_checks' => true,

    // Database table name
    'checks_table' => 'validator_pizza',

    // Cache enabled (recommended)
    'cache_checks' => true,

    // Duration in minutes to keep the query in cache
    'cache_duration' => 30,

    // Determine which decision should be given if the rate limit is exceeded [allow / deny]
    'decision_rate_limit' => 'allow',

    // Determine which decision should be given if the domain has no MX DNS record [allow / deny]
    'decision_no_mx' => 'allow',

    // Makes use of the API key
    'key' => env('VALIDATOR_PIZZA_KEY'),
];

Usage

Controller Validation

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class HomeController extends Controller
{
    public function handleEmail(Request $request)
    {
        $request->validate([
            'email' => 'required|email|disposable_pizza',
        ]);

        // ...
    }
}

Standalone

$checker = new \romanzipp\ValidatorPizza\Checker;

// Validate Email
$validEmail = $checker->allowedEmail('ich@ich.wtf');

// Validate Domain
$validDomain = $checker->allowedDomain('ich.wtf');

The Versions

23/06 2018

dev-master

9999999-dev

A Laravel Wrapper for the laravel.pizza disposable email API

  Sources   Download

MIT

The Requires

 

03/06 2018

0.0.4

0.0.4.0

A Laravel Wrapper for the laravel.pizza disposable email API

  Sources   Download

MIT

The Requires

 

12/04 2018

0.0.3

0.0.3.0

A Laravel Wrapper for the laravel.pizza disposable email API

  Sources   Download

MIT

The Requires

 

12/03 2018

0.0.2

0.0.2.0

A Laravel Wrapper for the laravel.pizza disposable email API

  Sources   Download

MIT

The Requires

 

12/03 2018

0.1.0

0.1.0.0

A Laravel Wrapper for the laravel.pizza disposable email API

  Sources   Download

MIT

The Requires

 

05/03 2018

0.0.1

0.0.1.0

A Laravel Wrapper for the laravel.pizza disposable email API

  Sources   Download

MIT

The Requires