{"id":16201893,"url":"https://github.com/ossycodes/nigeriabulksms","last_synced_at":"2025-03-19T05:31:08.572Z","repository":{"id":55643864,"uuid":"287586819","full_name":"ossycodes/nigeriabulksms","owner":"ossycodes","description":"this package makes it easy to send notifications via Nigeriabulksms with Laravel","archived":false,"fork":false,"pushed_at":"2023-09-22T13:38:15.000Z","size":34,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-24T15:10:14.001Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ossycodes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-14T17:20:42.000Z","updated_at":"2022-12-02T14:35:19.000Z","dependencies_parsed_at":"2024-10-10T09:44:50.484Z","dependency_job_id":"4e780323-9c3f-409d-9d00-4e5ee284364c","html_url":"https://github.com/ossycodes/nigeriabulksms","commit_stats":{"total_commits":11,"total_committers":3,"mean_commits":"3.6666666666666665","dds":0.2727272727272727,"last_synced_commit":"4c21294cdc2dfa2bc8d108b11ec72170dab396ca"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossycodes%2Fnigeriabulksms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossycodes%2Fnigeriabulksms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossycodes%2Fnigeriabulksms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossycodes%2Fnigeriabulksms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ossycodes","download_url":"https://codeload.github.com/ossycodes/nigeriabulksms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971180,"owners_count":20376784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T09:44:46.940Z","updated_at":"2025-03-19T05:31:08.226Z","avatar_url":"https://github.com/ossycodes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nigeriabulksms notification channel for Laravel\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/ossycodes/nigeriabulksms.svg?style=flat-square)](https://packagist.org/packages/ossycodes/nigeriabulksms)\n[![Total Downloads](https://img.shields.io/packagist/dt/ossycodes/nigeriabulksms.svg?style=flat-square)](https://packagist.org/packages/ossycodes/nigeriabulksms)\n\nThis package makes it easy to send notifications using [Nigeriabulksms]('http://portal.nigeriabulksms.com/) with Laravel 5 and above\n\n\n\n## Contents\n\n- [About](#about)\n- [Installation](#installation)\n- [Setting up the Nigeriabulksms service](#setting-up-the-nigeriabulksms-service)\n- [Usage](#usage)\n- [Security](#security)\n- [Contributing](#contributing)\n- [Credits](#credits)\n- [License](#license)\n\n## About\n\nThis package makes it possible to send out Laravel notifications as a `SMS ` using Nigeriabulksms API.\n\n## Installation\n\nYou can install this package via composer:\n\n``` bash\ncomposer require ossycodes/nigeriabulksms\n```\n\nThe service provider gets loaded automatically.\n\n### Setting up the Nigeriabulksms service\n\nYou will need to [Register](https://nigeriabulksms.com) to get your `username and password`. Place them inside your `.env` file. Remember to add your Sender ID that you will be using to send the messages. \n\n```bash\nNIGERIABULKSMS_USERNAME=\"\"\nNIGERIABULKSMS_PASSWORD=\"\"\nNIGERIABULKSMS_SENDER=\"\"\n```\n\nTo load them, add this to your `config/services.php` . This will load the Nigeriabulksms  data from the `.env` file.file:\n\n```php\n'nigeriabulksms' =\u003e [\n    'username'      =\u003e env('NIGERIABULKSMS_USERNAME'),\n    'password'      =\u003e env('NIGERIABULKSMS_PASSWORD'),\n    'sender'        =\u003e env('NIGERIABULKSMS_SENDER'),\n]\n```\n\nAdd the `routeNotifcationForNigeriabulksms` method on your notifiable Model.\n\n```php\n\u003c?php\n\nnamespace App;\n\nuse Illuminate\\Notifications\\Notifiable;\nuse Illuminate\\Foundation\\Auth\\User as Authenticatable;\n\nclass User extends Authenticatable\n{\n    use Notifiable;\n\n    /**\n     * Route notifications for the Nigeriabulksms channel.\n     *\n     * @param  \\Illuminate\\Notifications\\Notification  $notification\n     * @return string\n     */\n    public function routeNotificationForNigeriabulksms($notification)\n    {\n        return $this-\u003ephone;\n    }\n}\n```\n\n\n## Usage\n\n\nTo use this package, you need to create a notification class, like `NewsWasPublished` from the example below, in your Laravel application. Make sure to check out [Laravel's documentation](https://laravel.com/docs/master/notifications) for this process.\n\n\n```php\n\u003c?php\n\nuse NotificationChannels\\Nigeriabulksms\\NigeriabulksmsChannel;\nuse NotificationChannels\\Nigeriabulksms\\NigeriabulksmsMessage;\n\nclass NewsWasPublished extends Notification\n{\n    /**\n     * Get the notification's delivery channels.\n     *\n     * @param  mixed  $notifiable\n     * @return array\n     */\n    public function via($notifiable)\n    {\n        return [NigeriabulksmsChannel::class];\n    }\n\n    public function toNigeriabulksms($notifiable)\n    {\n\t\treturn (new NigeriabulksmsMessage())\n                    -\u003esetContent('Your SMS message content');\n\n    }\n}\n```\n\nAdditionally you can add recipients(the phonenumber the messages will be sent to) (single value or array)\n\n``` php\nreturn (new NigeriabulksmsMessage(\"Your {$notifiable-\u003eservice} was ordered!\"))-\u003esetRecipients($recipients);\n```\n\nalso you can add who the notification(sms) is sent from, this will overide the \nNIGERIABULKSMS_SENDER=\"\" in your .env\n\n``` php\nreturn (new NigeriabulksmsMessage(\"Your {$notifiable-\u003eservice} was ordered!\"))-\u003esetFrom(\"name of your app\");\n```\n\nIncase of errors from Nigeriabulksms service please do well to check [Nigeriabulksms api error codes on thier developer portal](https://nigeriabulksms.com/sms-gateway-api/)\n\n## Security\n\nIf you discover any security-related issues, please email osaigbovoemmanuel1@gmail.com instead of using the issue tracker.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Credits\n\n- [Osaigbovo Emmanuel](https://github.com/ossycodes)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## How do I say Thank you?\n\nLeave a star and follow me on [Twitter](https://twitter.com/ossycodes) .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossycodes%2Fnigeriabulksms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fossycodes%2Fnigeriabulksms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossycodes%2Fnigeriabulksms/lists"}