https://github.com/ghasedakapi/ghasedaksms-laravel
laravel package for use ghasedaksms api services
https://github.com/ghasedakapi/ghasedaksms-laravel
Last synced: 6 months ago
JSON representation
laravel package for use ghasedaksms api services
- Host: GitHub
- URL: https://github.com/ghasedakapi/ghasedaksms-laravel
- Owner: ghasedakapi
- License: mit
- Created: 2024-08-07T15:31:55.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-08-09T12:23:00.000Z (10 months ago)
- Last Synced: 2025-10-27T02:03:21.152Z (8 months ago)
- Language: PHP
- Size: 50.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
Ghasedak Laravel SDK
Easy-to-use SDK for implementing Ghasedak SMS API in your Laravel projects.
Explore the docs »
Web Service Documents
·
REST API
.
Report Bug
·
Request Feature
## Table of Contents
* [Install](#install)
* [Usage](#usage)
* [Licence](#license)
## Installation
You can install the package via composer:
```bash
composer require ghasedaksms/ghasedaksms-laravel
```
## Usage
1- Put your apikey in .env file:
```php
GHASEDAK_SMS_API_KEY="b7ee4eace78************************************************"
```
2- Create a notification (for example SendOtpToUser):
```
php artisan make:notification SendOtpToUser
```
3- Extend SendOtpToUser from GhasedaksmsBaseNotification and fill toGhasedaksms function with DTOs:
```php
setSendDate(Carbon::now());
$message->setReceptors([new ReceptorDTO($notifiable->mobile, 'client referenceId')]);
$message->setTemplateName('newOTP');
$message->setInputs([new InputDTO('code', '******')]);
return $message;
}
}
```
4- Use SendOtpToUser
```php
$user = new \App\Models\User();
$user->mobile = '0912*******';
$user->notify(new \App\Notifications\SendOtpToUser());
```
### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email mortezaei76@gmail.com instead of using the issue tracker.
## Credits
- [mrt](https://github.com/ghasedaksms)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
## Laravel Package Boilerplate
This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).