PHPackages                             laravel-lib/onewaysms - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. laravel-lib/onewaysms

ActiveLibrary[Queues &amp; Workers](/categories/queues)

laravel-lib/onewaysms
=====================

OneWaySMS Notifications channel for Laravel

v1.0.0(3y ago)019MITPHPPHP ^7.4 || ^8.0

Since May 29Pushed 3y agoCompare

[ Source](https://github.com/laravel-lib/onewaysms)[ Packagist](https://packagist.org/packages/laravel-lib/onewaysms)[ Docs](https://github.com/laravel-lib/onewaysms)[ RSS](/packages/laravel-lib-onewaysms/feed)WikiDiscussions master Synced 1mo ago

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

OneWaySMS Notifications Channel for Laravel
===========================================

[](#onewaysms-notifications-channel-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c5ffea74d933c24ebf7ce1361fbebf69d5aecc95adace75a3758ee7bad345f01/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f6f6e65776179736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/onewaysms)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/4a27568ea1cde6f302e829bc52613989ed7d3bf9bc655942c421fa21d579ff04/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f6f6e65776179736d732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/laravel-notification-channels/onewaysms)[![StyleCI](https://camo.githubusercontent.com/06d330f8e27b784f1f159fd6acbcce702ee8030ad4eb00b55f0e03f2ccf3dc57/68747470733a2f2f7374796c6563692e696f2f7265706f732f3232393832323437352f736869656c64)](https://styleci.io/repos/:style_ci_id)[![Quality Score](https://camo.githubusercontent.com/0e745d89cae41332bf27d2afdcf35fc2990fb605ae4c8354997c4f96a047676e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f6f6e65776179736d732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/onewaysms)[![Code Coverage](https://camo.githubusercontent.com/c08467fed1255f9af61ba00c5de5ede1c3b9029dc5cae4d731d4dc87340ba6ea/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f6f6e65776179736d732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/laravel-notification-channels/onewaysms/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/adf475eebda5156a3e79152941ee08507b9b54fa534f097ab357e1ba0d2cc30b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2d6e6f74696669636174696f6e2d6368616e6e656c732f6f6e65776179736d732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravel-notification-channels/onewaysms)

📲 This package makes it easy to send notifications (SMS) using [OneWaySMS](https://www.onewaysms.com.my/) with Laravel 6.x, 7.x, 8.x and 9.x

Contents
--------

[](#contents)

- [Installation](#installation)
    - [Setting up the OneWaySMS](#setting-up-the-onewaysms-service)
- [Usage](#usage)
    - [Available Message methods](#available-message-methods)
    - [On-Demand Notifications](#on-demand-notifications)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install this package via composer:

```
composer require laravel-lib/onewaysms
```

### Setting up the OneWaySMS service

[](#setting-up-the-onewaysms-service)

Add your OneWaySMS API account and settings to your `config/services.php` :

```
// config/services.php

'onewaysms' => [
    'username' => env('SMS_USERNAME', 'YOUR USERNAME HERE'),
    'password' => env('SMS_PASSWORD', 'YOUR PASSWORD HERE'),
    'endpoint' => env('SMS_ENDPOINT', 'https://gateway.onewaysms.com.my/api.aspx'),
    'sender' => env('SMS_SENDER', 'YOUR SENDER ID')
],
```

Usage
-----

[](#usage)

You can use the channel in your via() method inside the notification:

```
use Illuminate\Notifications\Notification;
use NotificationChannels\Onewaysms\OnewaysmsMessage;

class AccountApproved extends Notification
{
    public function via($notifiable)
    {
        return ["onewaysms"];
    }

    public function toOnewaysms($notifiable)
    {
        return (new OnewaysmsMessage)->content("Your account has been successfully approved !");
    }
}
```

In your notifiable model, make sure to include a routeNotificationForOnewaysms() method, which returns a phone number or an array of phone numbers.

```
public function routeNotificationForOnewaysms()
{
    return $this->phone;
}
```

### On-Demand Notifications

[](#on-demand-notifications)

Sometimes you may need to send a notification to someone who is not stored as a "user" of your application. Using the Notification::route method, you may specify ad-hoc notification routing information before sending the notification :

```
Notification::route('onewaysms', '+60123456789')
            ->notify(new InvoicePaid($invoice));
```

### Available Message methods

[](#available-message-methods)

`to()`: Sets the recipient's mobile no.

`from()`: Sets the sender id.

`content()`: Set a content of the notification message. This parameter should be no longer than 459 chars (3 message parts),

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Zulkifli Mohamed](https://github.com/putera)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Unknown

Total

1

Last Release

1444d ago

### Community

Maintainers

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

---

Top Contributors

[![putera](https://avatars.githubusercontent.com/u/314314?v=4)](https://github.com/putera "putera (7 commits)")[![atymic](https://avatars.githubusercontent.com/u/50683531?v=4)](https://github.com/atymic "atymic (5 commits)")[![mpociot](https://avatars.githubusercontent.com/u/804684?v=4)](https://github.com/mpociot "mpociot (2 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (1 commits)")

---

Tags

messagelaravelnotificationssmsMalaysiaonewaysms

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/slack-notification-channel

Slack Notification Channel for laravel.

89069.7M111](/packages/laravel-slack-notification-channel)[tzsk/sms

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

320244.3k6](/packages/tzsk-sms)[rinvex/laravel-authy

Rinvex Authy is a simple wrapper for Authy TOTP, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.

3376.7k1](/packages/rinvex-laravel-authy)

PHPackages © 2026

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