PHP code example of usevalid-email / laravel-sdk

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

    

usevalid-email / laravel-sdk example snippets


use UseValidEmail\LaravelSdk\LaravelSdk;

$token = 'your-access-token';
$sdk = new LaravelSdk($token);

use Illuminate\Support\Facades\Validator;

$validator = Validator::make(['email' => '[email protected]'], [
    'email' => 'valid_email',
]);

if ($validator->fails()) {
    echo "Invalid email.";
} else {
    echo "Valid email.";
}



namespace App\Http\Controllers;

use Illuminate\Http\Request;

class EmailValidationController extends Controller
{
    public function validateEmail(Request $request): \Illuminate\Http\RedirectResponse
    {
        $request->validate([
            'email' => '