PHPackages                             apxcde/laravel-onfon-sms - 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. apxcde/laravel-onfon-sms

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

apxcde/laravel-onfon-sms
========================

Add OnFon SMS to your laravel web application

v0.0.1(11mo ago)21.8k1PHPPHP ^8.1CI failing

Since Jun 13Pushed 11mo agoCompare

[ Source](https://github.com/apxcde/laravel-onfon-sms)[ Packagist](https://packagist.org/packages/apxcde/laravel-onfon-sms)[ Docs](https://github.com/apxcde/laravel-onfon-sms)[ GitHub Sponsors](https://github.com/apxcde)[ RSS](/packages/apxcde-laravel-onfon-sms/feed)WikiDiscussions main Synced 1mo ago

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

Add OnFon SMS to your laravel web application
=============================================

[](#add-onfon-sms-to-your-laravel-web-application)

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

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

[](#installation)

You can install the package via composer:

```
composer require apxcde/laravel-onfon-sms
```

### Publish the config file

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

You can publish the config file with:

```
php artisan vendor:publish --provider="Apxcde\OnfonSms\OnfonSmsServiceProvider" --tag="onfon-sms-config"
```

This is the contents of the published config file:

```
return [
    'senderId' => env('ONFON_SMS_SENDER_ID', ''),

    'api_key' => env('ONFON_SMS_API_KEY', ''),

    'client_id' => env('ONFON_SMS_CLIENT_ID', ''),

    'access_key' => env('ONFON_SMS_ACCESS_KEY', ''),
];
```

### Add Environment Variables

[](#add-environment-variables)

Set the variables below in your .env file. You will receive these variables from onfon media

```
ONFON_SMS_SENDER_ID=""
ONFON_SMS_API_KEY=""
ONFON_SMS_CLIENT_ID=""
ONFON_SMS_ACCESS_KEY=""
```

### Set up the notifiable model

[](#set-up-the-notifiable-model)

Add the routeNotificationForOnfon method on your notifiable Model. If this is not added, the phone\_number field will be automatically used.

```
