PHPackages                             isend/laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. isend/laravel

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

isend/laravel
=============

Laravel SDK for iSend SMS API v3

1.0.3(1y ago)6505MITPHPPHP ^8.2CI passing

Since May 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/sulimanbenhalim/isend-laravel)[ Packagist](https://packagist.org/packages/isend/laravel)[ Docs](https://isend.ly)[ RSS](/packages/isend-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (5)Used By (0)

iSend SMS Laravel Package
=========================

[](#isend-sms-laravel-package)

[![GitHub License](https://camo.githubusercontent.com/bbdee1875d3c01c3c26f68cc8e3d438ef1d4842dd951114307a75c29523c3ed2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f73756c696d616e62656e68616c696d2f6973656e642d6c61726176656c)](https://github.com/sulimanbenhalim/isend-laravel/blob/main/LICENSE.md)[![PHP Version Support](https://camo.githubusercontent.com/2a38189ebddcd255237b8da46df2e1435923035f259b9e4b261fd98ad4e9cea2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e322d626c7565)](https://www.php.net/supported-versions.php)[![Laravel Version Support](https://camo.githubusercontent.com/1bc65cbe3b5a8d0fa3c453b8f066ce33d867c978dcab5342b4d1bb3a9358f1a6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d25334525334425323031312e302d726564)](https://laravel.com/docs/11.x/releases)

A Laravel package for sending SMS messages using the iSend SMS API v3. Simple to use and easy to set up.

Key Features
------------

[](#key-features)

- SMS messaging with single/multiple recipients
- Message scheduling and delivery tracking
- Campaign management
- Error handling with detailed diagnostics
- Interactive CLI setup wizard

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 11.x or 12.x
- Guzzle HTTP client
- Valid iSend SMS API credentials

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require isend/laravel
```

The package will automatically register itself using Laravel's package discovery.

Configuration
-------------

[](#configuration)

### Interactive Setup (Recommended)

[](#interactive-setup-recommended)

The easiest way to set up the package is by using the interactive setup command:

```
php artisan isend:setup
```

This command will set up your API credentials and publish the config file in one step.

### Or, Manual Configuration

[](#or-manual-configuration)

Alternatively, you can manually publish the configuration file:

```
php artisan vendor:publish --tag="isend-config"
```

This will create a `config/isend.php` file with comprehensive configuration options.

Then, add these environment variables to your `.env` file:

```
ISEND_API_TOKEN=your-api-token
ISEND_DEFAULT_SENDER_ID=your-sender-id

```

### Optional Environment Variables

[](#optional-environment-variables)

You can customize the service with these additional variables:

```
ISEND_BASE_URL=https://isend.com.ly
ISEND_API_VERSION_PATH=/api/v3

```

Basic Usage
-----------

[](#basic-usage)

### Sending a Simple SMS

[](#sending-a-simple-sms)

```
use ISend\SMS\Facades\ISend;

// Fluent interface
ISend::to('218929000834')
    ->message('Your verification code is 1234')
    ->send();

// Get the SMS ID for tracking
$smsId = ISend::to('218929000834')
    ->message('Your verification code is 1234')
    ->send()
    ->getId();

// Static helper method
ISend::sendSms('218929000834', 'Your verification code is 1234');
```

### Multiple Recipients

[](#multiple-recipients)

```
// Send the same message to multiple recipients
ISend::to(['218929000834', '218929000836', '218929000837'])
    ->message('Important announcement for all users')
    ->send();

// Or as a comma-separated string
ISend::to('218929000834,218929000836,218929000837')
    ->message('Important announcement for all users')
    ->send();
```

### Custom Sender ID

[](#custom-sender-id)

```
ISend::to('218929000834')
    ->from('MyApp')  // Override the default sender ID
    ->message('Your verification code is 1234')
    ->send();
```

### Scheduled Messages

[](#scheduled-messages)

```
// Schedule a message for future delivery
ISend::to('218929000834')
    ->message('Reminder: Your appointment is tomorrow')
    ->scheduleAt('2025-12-31 09:00:00')  // Format: Y-m-d H:i
    ->send();
```

### DLT Template ID (for regulatory compliance)

[](#dlt-template-id-for-regulatory-compliance)

```
// For regions requiring DLT template registration
ISend::to('218929000834')
    ->message('Your OTP is 1234')
    ->dltTemplateId('template-123')
    ->send();
```

Advanced Features
-----------------

[](#advanced-features)

### Checking Message Status

[](#checking-message-status)

```
// Get the status of a sent message using its ID
$status = ISend::getStatus('sms-uid-123456');

// Example response structure
[
    'status' => 'success',
    'data' => [
        'uid' => 'sms-uid-123456',
        'status' => 'delivered',
        'sent_at' => '2025-01-01 12:00:00',
        'delivered_at' => '2025-01-01 12:00:05',
        // Additional status details...
    ]
]
```

### Listing Messages

[](#listing-messages)

```
// Get a list of all sent messages
$messages = ISend::listMessages();
```

### Campaign Management

[](#campaign-management)

```
// Send a campaign to a contact list
$campaign = ISend::sendCampaign(
    'contact-list-123',
    'Special offer for our valued customers!',
    'Marketing',  // Optional custom sender ID
    '2025-02-15 08:00:00'  // Optional schedule time
);

// Send to multiple contact lists
$campaign = ISend::sendCampaign(
    ['list-123', 'list-456'],
    'Special offer for all our customers!'
);
```

### Account Management

[](#account-management)

```
// Get profile information
$profile = ISend::getProfile();

// Check account balance
$balance = ISend::checkBalance();

// Get registered sender IDs
$senderIds = ISend::getSenderIds();

// Get transaction history
$transactions = ISend::getTransactions();
```

Exception Handling
------------------

[](#exception-handling)

The package throws `ISendException` with detailed error information:

```
use ISend\SMS\Exceptions\ISendException;

try {
    ISend::to('invalid-number')
        ->message('Test message')
        ->send();
} catch (ISendException $e) {
    // Basic error information
    $message = $e->getMessage();
    $statusCode = $e->getStatusCode();

    // Detailed error data
    $responseData = $e->getResponseData();  // Full API response
    $requestData = $e->getRequestData();    // The request that caused the error

    // Error type helpers
    if ($e->isAuthenticationError()) {
        // Handle 401 errors (invalid API token)
    }

    if ($e->isValidationError()) {
        // Handle 422 errors (invalid parameters)
    }

    if ($e->isServerError()) {
        // Handle 5xx errors (server issues)
    }

    // Get complete error details as array
    $errorDetails = $e->toArray();

    // Log the error or handle as needed...
}
```

Debugging
---------

[](#debugging)

For debugging purposes, you can access the last API response:

```
$response = ISend::to('218929000834')
    ->message('Test message')
    ->send()
    ->getLastResponse();
```

Testing
-------

[](#testing)

The package includes a comprehensive test suite:

```
composer test
```

Laravel Version Compatibility
-----------------------------

[](#laravel-version-compatibility)

Laravel VersionPackage Version11.x1.x12.x1.xSecurity
--------

[](#security)

If you discover any security issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [iSend SMS Service](https://isend.com.ly)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance48

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

379d ago

PHP version history (2 changes)1.0.0PHP ^8.0

1.0.2PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5f7720f88731294f320b81cfdab22d8a12ed4f49cc2502f0f54fc989f3c6ef6f?d=identicon)[sulimanbenhalim](/maintainers/sulimanbenhalim)

---

Top Contributors

[![sulimanbenhalim](https://avatars.githubusercontent.com/u/44615499?v=4)](https://github.com/sulimanbenhalim "sulimanbenhalim (14 commits)")

---

Tags

apilaravelnotificationsmsmessagingcommunicationisend

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/isend-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/isend-laravel/health.svg)](https://phpackages.com/packages/isend-laravel)
```

###  Alternatives

[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[gr8shivam/laravel-sms-api

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

10138.4k](/packages/gr8shivam-laravel-sms-api)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[tzsk/sms

A robust and unified SMS gateway integration package for Laravel, supporting multiple providers.

320244.3k6](/packages/tzsk-sms)[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

194.8k](/packages/ghanem-laravel-smsmisr)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
