PHPackages                             mocean/yii-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/yii-mocean

ActiveLibrary[API Development](/categories/api)

mocean/yii-mocean
=================

Mocean API for Yii Framework

v2.0.0(6y ago)010[1 PRs](https://github.com/MoceanAPI/yii-mocean/pulls)MITPHP

Since Dec 13Pushed 5y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

Yii Mocean
==========

[](#yii-mocean)

[![Latest Stable Version](https://camo.githubusercontent.com/29fe858a7b4632f258e40ad768fc3bfd538cf3a3a177d23ea05cb49a2e6f5090/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f6365616e2f7969692d6d6f6365616e2e737667)](https://packagist.org/packages/mocean/yii-mocean)[![Build Status](https://camo.githubusercontent.com/1e570a7ec74c9ea5c3f53cc17169df212872a971d14b51fa4149acdb7c112dcd/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f4d6f6365616e4150492f7969692d6d6f6365616e2e737667)](https://travis-ci.com/MoceanAPI/yii-mocean)[![StyleCI](https://camo.githubusercontent.com/360440e726cfc61b8a55fa7a0919cf2c94576847a2b30369d17593bfa5983204/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3136313630303634312f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/161600641)[![License](https://camo.githubusercontent.com/ccbb2490c89883f01e369a809ec17ea81961fc899eb29558c4d9a4cf4ad82fd1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6f6365616e2f7969692d6d6f6365616e2e737667)](https://packagist.org/packages/mocean/yii-mocean)[![Total Downloads](https://camo.githubusercontent.com/bcbf3d66a8ccc622f86dbb4aecb651ec905b454fec54eb510877413f4bf380e4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f6365616e2f7969692d6d6f6365616e2e737667)](https://packagist.org/packages/mocean/yii-mocean)

Yii Mocean API Integration

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

[](#installation)

To install the library, run this command in terminal:

```
composer require mocean/yii-mocean
```

Set configuration in config file

```
'components' => [
    'mocean' => [
        'class' => 'YiiMocean\MoceanServiceProvider',
        'defaults' => 'main',
        'accounts' => [ //define your account here
            'main' => [
                'api_key' => 'mainAccountApiKey',
                'api_secret' => 'mainAccountApiSecret'
            ],
            'secondary' => [ //if you have more then one account
                'api_key' => 'secondaryAccountApiKey',
                'api_secret' => 'secondaryAccountApiSecret'
            ]
        ],
    ],
]
```

Usage
-----

[](#usage)

Send a text message

```
//will be using the account defined in defaults
//see below if you have multiple accounts
Yii::$app->mocean->message()->send([
    'mocean-to' => '60123456789',
    'mocean-from' => 'MOCEAN',
    'mocean-text' => 'Hello World'
])
```

If you have multiple account defined in config

```
Yii::$app->mocean->using('secondary')->message()->send(...);
Yii::$app->mocean->using('third')->message()->send(...);
```

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

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

Total

3

Last Release

2510d ago

Major Versions

v1.0.1 → v2.0.02019-06-25

### 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 (9 commits)")

---

Tags

moceanmoceanapismsyiiyii2verifysmsyiiyiiframeworkmocean

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[multicaret/laravel-unifonic

 A library to integrate with Unifonic API to send SMS

25182.9k2](/packages/multicaret-laravel-unifonic)[monitorbacklinks/yii2-wordpress

Yii2 component for integration with Wordpress CMS via XML-RPC API

3526.9k](/packages/monitorbacklinks-yii2-wordpress)[baibaratsky/yii2-ga-measurement-protocol

Google Analytics Measurement Protocol for Yii2

13104.2k](/packages/baibaratsky-yii2-ga-measurement-protocol)[sonko-dmitry/yii2-telegram-bot-api

Telegram bot api component for Yii2

2132.2k](/packages/sonko-dmitry-yii2-telegram-bot-api)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.1k1](/packages/skeeks-yii2-google-api)

PHPackages © 2026

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