PHPackages                             mocean/laravel-notification-channel - 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. mocean/laravel-notification-channel

ActiveLibrary

mocean/laravel-notification-channel
===================================

Mocean Notification Channel for laravel.

1.0.1(6y ago)03[2 PRs](https://github.com/MoceanAPI/laravel-notification-channel/pulls)MITPHP

Since Jul 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/MoceanAPI/laravel-notification-channel)[ Packagist](https://packagist.org/packages/mocean/laravel-notification-channel)[ RSS](/packages/mocean-laravel-notification-channel/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (4)Versions (5)Used By (0)

Mocean Laravel Notification
===========================

[](#mocean-laravel-notification)

[![Latest Stable Version](https://camo.githubusercontent.com/1961e64c41e2a8fa139f05d1f397f933698adb3df83bd12f9c2690490cf4a80d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f6365616e2f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c2e737667)](https://packagist.org/packages/mocean/laravel-notification-channel)[![Build Status](https://camo.githubusercontent.com/4fafb96278c2f29d959a728569dd99baa36c288ef2c8698004278cf2bd41b164/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f4d6f6365616e4150492f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c2e737667)](https://travis-ci.com/MoceanAPI/laravel-notification-channel)[![StyleCI](https://camo.githubusercontent.com/0cf0ed6c679eb1078e2b1282a05083bbf08191e9d75a2a03e743cf988333ec91/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3139343936353633392f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/194965639)[![License](https://camo.githubusercontent.com/090fb4768369d68bdffd820b3bc525a79ce036a294a583c6f08f745b62fc9162/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6f6365616e2f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c2e737667)](https://packagist.org/packages/mocean/laravel-notification-channel)[![Total Downloads](https://camo.githubusercontent.com/859a1da77b3acad566c03412b091e010c75fa45e3e74262a7a827a31924a40ea/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f6365616e2f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c2e737667)](https://packagist.org/packages/mocean/laravel-notification-channel)

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

[](#installation)

To install the library, run this command in terminal:

```
composer require mocean/laravel-notification-channel
```

### Laravel 5.5

[](#laravel-55)

You don't have to do anything else, this package autoloads the Service Provider and create the Alias, using the new Auto-Discovery feature.

### Laravel 5.4 and below

[](#laravel-54-and-below)

Add the Service Provider and Facade alias to your `config/app.php`

```
'providers' => [
    Mocean\Notification\MoceanChannelServiceProvider::class,
]
```

Usage
-----

[](#usage)

You must publish the config file as this will use [Laravel Mocean](https://github.com/MoceanAPI/laravel-mocean) as a package.

```
php artisan vendor:publish --provider="Mocean\Laravel\MoceanServiceProvider"
```

Create a notification class, refer [laravel official docs](https://laravel.com/docs/notifications#creating-notifications)

```
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;

class InvoicePaid extends Notification
{
    use Queueable;

    public function via($notifiable)
    {
        //define mocean-sms as notification channel
        return ['mocean-sms'];
    }

    public function toMoceanSms($notifiable)
    {
        //return the text message u want to send here
        return 'You have received an invoice';

        //you can also return an array for custom options, refer moceanapi docs
        return [
            'mocean-text' => 'You have received an invoice',
            'mocean-dlr-url' => 'http://test.com'
        ];
    }
}
```

to specify which attribute should be used to be a notifiable entity, create method `routeNotificationForMoceanSms`

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

class User extends Authenticatable
{
    use Notifiable;

    public function routeNotificationForMoceanSms($notification)
    {
        //make sure user model has this attribute, else the notification will not be sent
        return $this->phone;
    }
}
```

send the notification to a user

```
$user->notify(new InvoicePaid());
```

you can also send the notification to a custom phone number without using user model

```
use Notification;

Notification:route('mocean-sms', '60123456789')
    ->notify(new InvoicePaid());
```

License
-------

[](#license)

Mocean Laravel Notification is licensed under the [MIT License](LICENSE)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~85 days

Total

2

Last Release

2419d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/acc98571adfb81af696cf57565b5e27b22a46ca4a4f360d5209271fd8bed9ba7?d=identicon)[MoceanAPI](/maintainers/MoceanAPI)

![](https://www.gravatar.com/avatar/aca461123c7542f69d0c14b646c4e16b5f2001e182784f53d76f9978abbb44e2?d=identicon)[lkloon123](/maintainers/lkloon123)

---

Top Contributors

[![lkloon123](https://avatars.githubusercontent.com/u/21114981?v=4)](https://github.com/lkloon123 "lkloon123 (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mocean-laravel-notification-channel/health.svg)

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

###  Alternatives

[spatie/laravel-backup

A Laravel package to backup your application

6.0k21.8M191](/packages/spatie-laravel-backup)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k25.9M107](/packages/laravel-cashier)[laravel/slack-notification-channel

Slack Notification Channel for laravel.

89069.7M111](/packages/laravel-slack-notification-channel)[kreait/laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

1.3k16.5M42](/packages/kreait-laravel-firebase)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)

PHPackages © 2026

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