Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Sdk Laravel Package

zero-bounce/sdk

Framework-agnostic PHP SDK for the ZeroBounce email validation API. Install via Composer, initialize with your API key, and call endpoints like getCredits. Supports base URL selection (Default/USA/EU) and works smoothly in Laravel apps.

View on GitHub
Deep Wiki
Context7

ZeroBounce Php SDK Setup

Frequently asked questions about Sdk
How do I integrate ZeroBounce SDK into a Laravel 10.x application?
Start by requiring the package via Composer (`composer require zero-bounce/sdk`). Initialize the SDK with your API key in a service provider or facade, then bind it to Laravel’s container for dependency injection. Use the `ZeroBounce::Instance()` singleton to call methods like `validate()` or `getCredits()`. For async bulk operations, wrap SDK calls in Laravel jobs and dispatch them to queues.
Does this SDK support Laravel’s service container and facades?
The SDK is framework-agnostic, so you’ll need to manually bind it to Laravel’s container in a service provider. Create a facade (e.g., `ZeroBounce`) to simplify usage, like `ZeroBounce::validate($email)`. This approach aligns with Laravel’s dependency injection while keeping the SDK’s core logic intact.
Can I use this SDK for bulk email validation in Laravel?
Yes, the SDK supports bulk validation via `sendFile()` for async processing. In Laravel, dispatch these calls as queue jobs to handle large datasets without blocking requests. Use Laravel’s filesystem (e.g., `Storage` facade) to manage upload/download paths for bulk operations.
How do I handle API rate limits or credit monitoring in Laravel?
The SDK’s `getCredits()` method lets you check remaining credits programmatically. For Laravel, extend this with middleware or a custom dashboard to log API calls and enforce throttling. Combine this with Laravel’s caching (e.g., Redis) to store validation results and reduce API calls.
What Laravel versions and PHP requirements does this SDK support?
The SDK is compatible with Laravel 10.x and PHP 8.1+. While the SDK itself is framework-agnostic, ensure your Laravel app meets these requirements. Test thoroughly, as the SDK’s low adoption means limited version-specific guarantees.
How do I secure my ZeroBounce API key in Laravel?
Store the API key in Laravel’s `.env` file (e.g., `ZEROBounce_API_KEY`) and access it via `config('services.zerobounce.key')`. Avoid hardcoding keys in source files. For added security, use Laravel’s encryption or a secrets manager like Vault for production.
Are there Laravel-specific testing utilities for this SDK?
The SDK lacks built-in Laravel testing tools, so you’ll need to mock it manually. Use Laravel’s `Mockery` or PHPUnit to simulate API responses. For integration tests, create a wrapper class to abstract SDK calls and test interactions with Laravel’s queues or caching layers.
Can I extend the SDK to support additional ZeroBounce endpoints?
Yes, the SDK’s object-oriented design allows extension. Create a wrapper class in Laravel to add custom methods (e.g., for new ZeroBounce endpoints) or override existing ones. Use Laravel’s service container to bind your extended class instead of the default SDK instance.
How do I handle errors or API failures in Laravel?
The SDK throws `ZBException` for API failures. Extend Laravel’s exception handler to log these errors or convert them to HTTP responses. For retries, use Laravel’s `retry` helper or a queue job with exponential backoff. Monitor failures via Laravel’s logging or a custom dashboard.
What are the alternatives to this SDK for Laravel email validation?
Alternatives include Laravel-specific packages like `spatie/laravel-activitylog` (for activity tracking) or `laravel-ide-helper` (for IDE support), but none directly compete with ZeroBounce’s API. For email validation, consider `mailcheck/mailcheck` (client-side) or building a custom wrapper around ZeroBounce’s API for tighter Laravel integration.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity