Home / Integrations / LAR

Framework Integration

Use NexMailPro inside Laravel validation, services, and queued workflows

Install the official Laravel package to verify email addresses in Form Requests, controllers, jobs, and application services without wiring raw HTTP calls into every action.

Primary path

Official Laravel package

Best for

Form Requests and service classes

Stack fit

Laravel 10, 11, and 12

LAR

NexMailPro Integration

Laravel Email Verification Integration

Use the package facade when verification belongs in application services or jobs.
Use the built-in rule when you want real verification during request validation.
Test connectivity from the Laravel runtime before deploying the flow into production traffic.

Use Cases

Where this integration fits best

These are the workflow patterns where Laravel Email Verification Integration typically creates the most leverage for a NexMailPro rollout.

Account registration

Reject bad email addresses before a Laravel registration, invite, or onboarding flow creates user records and downstream notifications.

Lead capture and sales ops

Protect demo requests, trial signups, and inbound lead forms without building separate verification clients in each controller.

Queued imports and background actions

Call NexMailPro from jobs when validating partner feeds, CSV uploads, or CRM synchronization tasks in the background.

Setup Steps

How to implement this path

1

Install the Laravel package with Composer

Bring the official NexMailPro Laravel package into the application that owns your registration, lead, or import workflow.

2

Configure the environment values

Add the NexMailPro API key and base URL to the Laravel environment so the package can resolve credentials from config.

3

Choose validation rule or facade usage

Use the validation rule for form submissions and the facade for service-layer orchestration, jobs, or custom policy logic.

4

Exercise the flow from Artisan and application tests

Run the package test command and add feature tests around your form or API entry point so the integration is verified end to end.

Code Example

Implementation pattern

Verify during a Form Request validation pass

Keep verification close to the request boundary when signups or lead forms enter the Laravel app.

php
<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use NexMailPro\Laravel\Rules\NexMailProEmail;

class StoreLeadRequest extends FormRequest
{
    public function rules(): array
    {
        return [
            'email' => ['required', 'email', new NexMailProEmail()],
            'name' => ['required', 'string', 'max:255'],
        ];
    }
}

Implementation Notes

Operational decisions that matter

Use the rule for synchronous user-facing forms

Form Requests keep validation logic readable and make it obvious when verification is part of the request contract.

Use the facade for orchestration

If the decision depends on campaign, account, or billing context, move the NexMailPro call into a dedicated Laravel service class.

Separate single and bulk responsibilities

Single verification should protect transactions and forms. Bulk verification should live in queued or operator-driven workflows.

FAQ

Laravel Email Verification Integration questions

When should a Laravel app use the validation rule?

Use the rule when email quality is part of the request contract, such as registration, checkout, invite, or lead-form submission.

When should I call the facade directly instead?

Use the facade in services or jobs when the verification decision depends on business logic that is broader than request validation.

Can Laravel teams still use the raw REST API?

Yes, but the package is usually the faster path because it keeps configuration, verification, and Laravel-specific integration concerns in one layer.

Next Step

Turn LAR into a production-ready NexMailPro workflow

Use the integration guide to shape the implementation, then pull your API key, test with the docs, and move from manual checks into stable validation across forms, apps, imports, or commerce flows.