Download the PHP package theihasan/laravel-mailerlite without Composer

On this page you can find all versions of the php package theihasan/laravel-mailerlite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-mailerlite

Laravel MailerLite

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A comprehensive, fluent Laravel wrapper for the official MailerLite PHP SDK. Provides strongly-typed DTOs, expressive builders that read like English, robust services with granular exception handling, contracts for testability, and comprehensive test coverage.

🔗 Built For: This package is specifically designed for Filament MailerLite Plugin - a complete MailerLite management interface for Filament Admin.

📦 Uses Official SDK: Built on top of the official MailerLite PHP SDK for reliable API integration.

⚠️ Plan Requirements: Campaign and Automation features require MailerLite Advanced Plan. Subscribers, Groups, Fields, and Webhooks work on all plans including Free.

Table of Contents

Installation

The package will auto-register via Laravel's package discovery.

Publish Config

Configuration

Add your MailerLite API key to .env:

Configuration file (config/mailerlite.php):

Subscribers

How to Get All Subscribers

How to Create a Subscriber

How to Fetch a Subscriber

How to Update a Subscriber

How to Delete a Subscriber

How to Get Total Subscriber Count

How to Unsubscribe/Resubscribe a Subscriber

How to Manage Subscriber Groups

How to Import Subscribers in Bulk

Groups

How to Get All Groups

How to Create a Group

How to Fetch a Group

How to Update a Group

How to Delete a Group

How to Manage Group Subscribers

Fields

How to Get All Fields

How to Create a Field

How to Fetch a Field

How to Update a Field

How to Delete a Field

How to Get Field Usage Stats

Campaigns 🚧 Under Development

⚠️ Notice: Campaign features are currently under active development. Some functionality may change in future releases.

📋 Plan Requirements: Campaign features vary by MailerLite plan:

  • Free Plan: Can create regular campaigns (basic email campaigns)
  • Growing Business Plan: Adds resend and multivariate campaign types
  • Advanced Plan: Full API access + advanced content features

💡 Quick Start for Free Users: Use .forFreePlan() method for guaranteed compatibility.

How to Get All Campaigns

How to Create a Campaign

Plan-Specific Error Handling

💡 Pro Tips:

  • Use .forFreePlan() method for guaranteed free plan compatibility
  • Campaign name is required by MailerLite API (auto-generated from subject if not provided)
  • Use group IDs for better performance, or group names (auto-resolved to IDs)
  • Both HTML and plain text content are recommended but only one is required
  • regular campaigns work on all plans including Free
  • resend and multivariate require Growing Business or Advanced Plan

How to Fetch a Campaign

How to Update a Campaign

How to Delete a Campaign

How to Manage Campaign Operations

Segments

⚠️ Important Note: Segment creation is NOT supported by the MailerLite API. Segments must be created through the MailerLite web interface. Once created, you can manage them via this package.

How to Get All Segments

How to Create a Segment

❌ Segments cannot be created via API. Use the MailerLite web interface instead:

✅ To create segments:

  1. Go to MailerLite Dashboard
  2. Navigate to SubscribersSegments
  3. Click Create Segment
  4. Set up your filters using the visual interface
  5. Use this package to manage the segment via API

How to Fetch a Segment

How to Update a Segment

How to Delete a Segment

How to Manage Segment Operations

Supported vs Unsupported Operations

Operation Supported Method
List segments MailerLite::segments()->all()
Get segment subscribers MailerLite::segments()->getSubscribers($id)
Update segment name MailerLite::segments()->update($id, $dto)
Delete segment MailerLite::segments()->delete($id)
Create segment Use web interface
Update segment filters Use web interface
Activate/deactivate Use web interface

Automations 🚧 Under Development

⚠️ Notice: Automation features are currently under active development. Some functionality may change in future releases.

⚠️ MailerLite Plan Requirement: Automation creation and management requires a MailerLite Advanced Plan or higher. Free and Basic plans may have limited automation features. Some operations may fail with plan-related restrictions.

How to Get All Automations

How to Create an Automation

How to Fetch an Automation

How to Update an Automation

How to Delete an Automation

How to Manage Automation Operations

Webhooks

How to Get All Webhooks

How to Create a Webhook

How to Fetch a Webhook

How to Update a Webhook

How to Delete a Webhook

How to Manage Webhook Operations

Testing

Running Tests

Example Test

API Limitations & Important Notes

MailerLite Plan Requirements

⚠️ Important: Some features require specific MailerLite subscription plans:

Feature Free Plan Growing Business Plan Advanced Plan Required For
Subscribers ✅ Full Access ✅ Full Access ✅ Full Access All operations
Groups ✅ Full Access ✅ Full Access ✅ Full Access All operations
Fields ✅ Full Access ✅ Full Access ✅ Full Access All operations
Segments ✅ View Only ✅ Full Access ✅ Full Access Create/Update via web UI
Campaigns 🚧 ✅ Regular Only ✅ + Resend/Multivariate Full Access API Creation/Management
Automations 🚧 ❌ Limited ✅ Basic Full Access Advanced Features
Webhooks ✅ Full Access ✅ Full Access ✅ Full Access All operations

Common Plan-Related Errors:

MailerLite API Resource Limitations

Due to MailerLite API constraints, some resources don't have direct "get by ID" endpoints. This package implements intelligent workarounds using search-through-list functionality:

Resources with Search-Based Retrieval

Resource Limitation Package Solution
Campaigns No single campaign endpoint Searches through campaign list by name
Segments No single segment endpoint Searches through segment list by name
Automations No single automation endpoint Searches through automation list by name
Webhooks No single webhook endpoint Searches through webhook list by URL

How Search-Based Functionality Works

Performance Considerations

⚠️ Important Performance Notes:

Segment Creation

❌ Not supported via API - Segments must be created through the MailerLite web interface. Once created, you can manage them via this package.

Campaign Requirements

✅ Name field is required - MailerLite API requires a campaign name. If not provided, it's auto-generated from the subject line.

Group Resolution

✅ Automatic group name → ID resolution - You can use group names or IDs interchangeably.

Search Operation Error Handling

Best Practices for Search-Based Operations

Error Handling

The package provides granular exception handling:

Common Plan-Related Errors & Solutions

License

The MIT License (MIT). Please see License File for more information.

Credits


All versions of laravel-mailerlite with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0|^11.0
mailerlite/mailerlite-php Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package theihasan/laravel-mailerlite contains the following files

Loading the files please wait ....