PHPackages                             mocean/laravel-mocean - 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. [API Development](/categories/api)
4. /
5. mocean/laravel-mocean

ActiveLibrary[API Development](/categories/api)

mocean/laravel-mocean
=====================

Mocean API for Laravel

4.0.0(1y ago)01691[1 PRs](https://github.com/MoceanAPI/laravel-mocean/pulls)1MITPHPPHP &gt;=8.2

Since Jun 9Pushed 1y ago1 watchersCompare

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

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

Laravel Mocean
==============

[](#laravel-mocean)

[![Latest Stable Version](https://camo.githubusercontent.com/9ce130fd9bcb65cf6307b1c6413723d897e31804967a730f59eceb0250a5b30f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f6365616e2f6c61726176656c2d6d6f6365616e2e737667)](https://packagist.org/packages/mocean/laravel-mocean)[![build](https://github.com/MoceanAPI/laravel-mocean/actions/workflows/ci-coverage.yml/badge.svg)](https://github.com/MoceanAPI/laravel-mocean/actions/workflows/ci-coverage.yml)[![License](https://camo.githubusercontent.com/e715e55d3a1a7272efdb0d96796917a3f75de8238fdf3b996fbc670ce2a26785/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6f6365616e2f6c61726176656c2d6d6f6365616e2e737667)](https://packagist.org/packages/mocean/laravel-mocean)[![Total Downloads](https://camo.githubusercontent.com/9e31e5564bd17f6ef1a8d81ec3474780dafe8b7c8e0f3493bca79484f8ba3828/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f6365616e2f6c61726176656c2d6d6f6365616e2e737667)](https://packagist.org/packages/mocean/laravel-mocean)

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

[](#installation)

To install the library, run this command in terminal:

```
composer require mocean/laravel-mocean
```

### 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\Laravel\MoceanServiceProvider::class,
]

'aliases' => [
    'Mocean' => Mocean\Laravel\Facade\Facade::class,
]
```

### Publish the config file

[](#publish-the-config-file)

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

Usage
-----

[](#usage)

Creating a Mocean object

```
//use configured mocean setting from Laravel IOC Container
$mocean = app('mocean');
```

Send a text message

```
$mocean->message()->send([
    'mocean-to' => '60123456789',
    'mocean-from' => 'MOCEAN',
    'mocean-text' => 'Hello World'
]);
```

If you have multiple account defined in config

```
$mocean->using('second_account')->message()->send(...);
$mocean->using('third_account')->message()->send(...);
```

or use credential programmatically

```
//by \Mocean\Client\Credentials\Basic class
$mocean->using(
    new \Mocean\Client\Credentials\Basic('mocean_api_key', 'mocean_api_secret')
)->message()->send(...);

//by using array
$mocean->using([
    'MOCEAN_API_KEY' => 'mocean_api_key',
    'MOCEAN_API_SECRET' => 'mocean_api_secret'
])->message()->send(...);
```

### Using Facade

[](#using-facade)

Facade auto configured using the config file, make sure u publish the config file.

Include this facade

```
use Mocean;

Mocean::message()->send(...);
Mocean::using(...)->message(...);
```

then u can statically call all function defined in the sdk. Look [Usage](https://moceanapi.com/docs/?php#) for more usage info.

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% 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 ~461 days

Total

5

Last Release

687d ago

Major Versions

1.0.0 → 2.0.02019-06-14

2.0.1 → 3.0.02022-10-18

3.0.0 → 4.0.02024-06-25

PHP version history (3 changes)1.0.0PHP &gt;=5.5.0

3.0.0PHP &gt;=7.3 &lt;8

4.0.0PHP &gt;=8.2

### 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 (12 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (5 commits)")[![d3no](https://avatars.githubusercontent.com/u/19152825?v=4)](https://github.com/d3no "d3no (4 commits)")

---

Tags

laravelmoceanmoceanapismslaravelverifysmsmocean

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[multicaret/laravel-unifonic

 A library to integrate with Unifonic API to send SMS

25182.9k2](/packages/multicaret-laravel-unifonic)[ardakilic/mutlucell

Mutlucell SMS API wrapper for sending sms text messages for Laravel

457.3k](/packages/ardakilic-mutlucell)

PHPackages © 2026

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