PHPackages                             emotality/panacea-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. emotality/panacea-laravel

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

emotality/panacea-laravel
=========================

Laravel package to send transactional SMSes via PanaceaMobile.

2.1.2(6mo ago)334.7k↓33.6%2MITPHPPHP &gt;=7.2.5

Since Oct 19Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/emotality/panacea-laravel)[ Packagist](https://packagist.org/packages/emotality/panacea-laravel)[ Docs](https://github.com/emotality/panacea-laravel)[ Fund](https://www.buymeacoffee.com/emotality)[ GitHub Sponsors](https://github.com/emotality)[ RSS](/packages/emotality-panacea-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (13)Used By (0)

PanaceaMobile for Laravel
=========================

[](#panaceamobile-for-laravel)

 [![License](https://camo.githubusercontent.com/4fe22126d6327dd5a17ab443892b590490638cc14431e0b3a1fdd07d00286b10/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f656d6f74616c6974792f70616e616365612d6c61726176656c)](https://packagist.org/packages/emotality/panacea-laravel) [![Latest Version](https://camo.githubusercontent.com/18a36d1b5a0a933e52ff1eb6f51bf4b5148086559642cb70810c270aa96fb7f8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656d6f74616c6974792f70616e616365612d6c61726176656c)](https://packagist.org/packages/emotality/panacea-laravel) [![Total Downloads](https://camo.githubusercontent.com/cae7c49e321e2a43e5c3c0c05feb1a00960a514f13eb17cf50b8e9e6b853bf20/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656d6f74616c6974792f70616e616365612d6c61726176656c)](https://packagist.org/packages/emotality/panacea-laravel)

Laravel package to send transactional SMSes via PanaceaMobile.

 [ ![](https://camo.githubusercontent.com/6503c5c86fd5f0466423467ca99c70776448d9bb63b6bb87790922b70425a192/68747470733a2f2f656d6f74616c6974792e636f6d2f646576656c6f706d656e742f4769744875622f50616e616365614d6f62696c652e706e67) ](https://www.panaceamobile.com)

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

[](#requirements)

- PHP 7.2+
- Laravel 7.0+

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

[](#installation)

1. `composer require emotality/panacea-laravel`
2. `php artisan vendor:publish --provider="Emotality\Panacea\PanaceaMobileServiceProvider"`
3. Add the following lines to your `.env` file:

```
PANACEA_USERNAME=""
PANACEA_PASSWORD=""
PANACEA_FROM="" // Optional

```

Usage
-----

[](#usage)

### Sending an SMS to a single recipient:

[](#sending-an-sms-to-a-single-recipient)

```
\PanaceaMobile::sms('+27820000001', "1st Line\n2nd Line\n3rd Line");
// or
\PanaceaMobile::sms('+27820000001', "1st Line\n2nd Line\n3rd Line", 'From Name');
```

Response will be a `bool`, `true` if successful, `false` if unsuccessful.

---

### Sending an SMS to multiple recipients:

[](#sending-an-sms-to-multiple-recipients)

```
\PanaceaMobile::smsMany(['+27820000001', '+27820000002'], "1st Line\n2nd Line\n3rd Line");
// or
\PanaceaMobile::smsMany(['+27820000001', '+27820000002'], "1st Line\n2nd Line\n3rd Line", 'From Name');
```

Response will be an array where the keys are the recipients' numbers, the values will be booleans:

```
array:2 [▼
  "+27820000001" => true
  "+27820000002" => false
]
```

---

### Sending an SMS via notification:

[](#sending-an-sms-via-notification)

```
namespace App\Notifications;

use Emotality\Panacea\PanaceaMobileSms;
use Emotality\Panacea\PanaceaMobileSmsChannel;
use Illuminate\Notifications\Notification;

class ExampleNotification extends Notification
{
    // Notification channels
    public function via($notifiable)
    {
        return [PanaceaMobileSmsChannel::class];
    }

    // Send SMS
    public function toSms($notifiable) // Can also use toPanacea($notifiable)
    {
        // Send SMS without "to", this value will automatically be fetched from
        // the "routeNotificationForPanacea" method in your notifiable entity.
        // See the "Routing SMS Notifications" section below.
        return (new PanaceaMobileSms())->message("1st Line\n2nd Line\n3rd Line");

        // or send SMS to a single recipient, specifying the "to" value
        return (new PanaceaMobileSms())
            ->to($notifiable->mobile) // Assuming $user->mobile is their mobile number
            ->from('From Name') // Optional. Will override config's "from" value.
            ->message("1st Line\n2nd Line\n3rd Line");

        // or send SMS to multiple recipients
        return (new PanaceaMobileSms())
            ->toMany(['+27820000001', '+27820000002'])
            ->from('From Name') // Optional. Will override config's "from" value.
            ->message("1st Line\n2nd Line\n3rd Line");
    }
}
```

### Routing SMS Notifications

[](#routing-sms-notifications)

To route Panacea notifications to the proper phone number, define a `routeNotificationForPanacea` method on your notifiable entity:

```
namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

class User extends Authenticatable
{
    use Notifiable;

    /**
     * Route notifications for the Panacea channel.
     *
     * @param  \Illuminate\Notifications\Notification  $notification
     * @return string
     */
    public function routeNotificationForPanacea($notification)
    {
        return $this->mobile;
    }
}
```

License
-------

[](#license)

panacea-laravel is released under the MIT license. See [LICENSE](https://github.com/emotality/panacea-laravel/blob/master/LICENSE) for details.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance66

Regular maintenance activity

Popularity33

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.4% 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 ~166 days

Recently: every ~176 days

Total

12

Last Release

204d ago

Major Versions

1.x-dev → 2.0.02022-07-18

PHP version history (4 changes)v1.0PHP &gt;=5.6.0

v1.1.0PHP &gt;=7.1.0

v1.1.2PHP &gt;=7.0.0

2.0.0PHP &gt;=7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/0edff3a3b92fcabd1418b4af5a91783ba51d122e0e1d0b06603102b856ae099b?d=identicon)[emotality](/maintainers/emotality)

---

Top Contributors

[![emotality](https://avatars.githubusercontent.com/u/2683462?v=4)](https://github.com/emotality "emotality (14 commits)")[![Monomachus](https://avatars.githubusercontent.com/u/65164?v=4)](https://github.com/Monomachus "Monomachus (3 commits)")

---

Tags

apilaravellaravel-packagenotificationspanaceapanaceamobilephpphp-librarysmssms-apilaravelsmspanaceatransactional smspanaceamobile

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[tzsk/sms

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

320244.3k6](/packages/tzsk-sms)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[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)[ghanem/laravel-smsmisr

Send SMS and SMS Notification via SMS Misr for Laravel

194.8k](/packages/ghanem-laravel-smsmisr)[hooman-mirghasemi/laravel-iran-sms

Laravel Sms

241.8k](/packages/hooman-mirghasemi-laravel-iran-sms)

PHPackages © 2026

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