Download the PHP package bentonow/bento-laravel-sdk without Composer
On this page you can find all versions of the php package bentonow/bento-laravel-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bentonow/bento-laravel-sdk
More information about bentonow/bento-laravel-sdk
Files in bentonow/bento-laravel-sdk
Package bento-laravel-sdk
Short Description Laravel SDK for Bento
License MIT
Homepage https://github.com/bentonow/bento-laravel-sdk
Informations about the package bento-laravel-sdk
Bento Laravel SDK

[!TIP] Need help? Join our Discord or email [email protected] for personalized support.
The Bento Laravel SDK makes it quick and easy to send emails and track events in your Laravel applications. We provide powerful and customizable APIs that can be used out-of-the-box to manage subscribers, track events, and send transactional emails. We also expose low-level APIs so that you can build fully custom experiences.
Get started with our 📚 integration guides, or 📘 browse the SDK reference.
🐶 Battle-tested by High Performance SQLite (a Bento customer)!
❤️ Thank you @aarondfrancis for your contribution.
❤️ Thank you @ziptied for your contribution.
Table of contents
- Features
- Requirements
- Getting started
- Installation
- Configuration
- Modules
- Things to Know
- Contributing
- License
Features
- Laravel Mail Integration: Seamlessly integrate with Laravel's mail system to send transactional emails via Bento.
- Event Tracking: Easily track custom events and user behavior in your Laravel application.
- Subscriber Management: Import and manage subscribers directly from your Laravel app.
- API Access: Full access to Bento's REST API for advanced operations.
- Laravel-friendly: Designed to work smoothly with Laravel's conventions and best practices.
Requirements
- PHP 8.0+
- Laravel 10.0+
- Bento API Keys
Getting started
Installation
Install the package via Composer:
Configuration (Prompt-Based)
After installing, run the install command to set up your environment interactively:
You will be prompted for:
- Your Bento Publishable Key
- Your Bento Secret Key
- Your Bento Site UUID
- Whether you want to enable Bento for transactional emails
- The author email for transactional mail (if transactional emails are enabled)
- Whether you want to send a test email after configuration
- Whether you want to automatically update your
.env
file
If you decline automatic .env
modification, the command will display the required environment variables for you to copy and add manually. You will also see links to the Bento Laravel documentation and the Bento app.
Note: The install command uses Laravel Prompts for a modern, interactive setup experience. This requires Laravel 10+ and PHP 8.1+.
Manual Configuration (Advanced)
If you prefer, you can manually add the following to your .env
file:
Testing Your Configuration
You can verify your transactional email configuration by running:
This command will:
- Verify that Bento is configured as your default mailer
- Send a test email to your configured
MAIL_FROM_ADDRESS
- Provide immediate feedback on the success or failure of the test
Note: The test command requires Bento to be configured as your default mailer (
MAIL_MAILER=bento
) and a validMAIL_FROM_ADDRESS
to be set.
Modules
Event Tracking
Track custom events in your application:
Subscriber Management
Import subscribers into your Bento account:
Find Subscriber
Search your site for a subscriber:
Create Subscriber
Creates a subscriber in your account and queues them for indexing:
Run Command
Execute a command and change a subscriber's data:
Get Tags
Returns a list of tags in your account:
Create Tag
Creates a custom tag in your account:
Get Fields
The field model is a simple named key value pair, think of it as a form field:
Create Field
Creates a custom field in your account:
Get Broadcasts
Returns a list of broadcasts in your account:
Create Broadcasts
Create new broadcasts to be sent:
Get Site Stats
Returns a list of site stats:
Get Segment Stats
Returns a list of a segments stats:
Get Report Stats
Returns an object containing data for a specific report:
Search Blacklists
Validates the IP or domain name with industry email reputation services to check for delivery issues:
Validate Email
Validates the email address using the provided information to infer its validity:
Moderate Content
An opinionated Content moderation:
Guess Gender
Guess a subscriber's gender using their first and last name. Best for US users; based on US Census Data:
Geolocate Ip Address
This endpoint attempts to geolocate the provided IP address:
Things to Know
- The SDK integrates seamlessly with Laravel's mail system for sending transactional emails.
- For event tracking and data importing, use the BentoConnector class.
- All API requests are made using strongly-typed request classes for better type safety.
- The SDK supports Laravel's environment-based configuration for easy setup across different environments.
- For signed emails with return urls, please assign the
bento.signature
middleware or theBentoSignatureExclusion::class
. This must be before the signed middleware to remove all utm and tracking url params. - Bento does not support
no-reply
sender addresses for transactional emails. You MUST use an author you have configured as your sender address. - For more advanced usage, refer to the Bento API Documentation.
Contributing
We welcome contributions! Please see our contributing guidelines for details on how to submit pull requests, report issues, and suggest improvements.
License
The Bento SDK for Laravel is available as open source under the terms of the MIT License.