承接 ghasedaksms/ghasedaksms-laravel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ghasedaksms/ghasedaksms-laravel

最新稳定版本:v1.0.3

Composer 安装命令:

composer require ghasedaksms/ghasedaksms-laravel

包简介

laravel package for use ghasedaksms api services

README 文档

README

Logo

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


contributors forks stars issues license

English Document

Table of Contents

Installation

You can install the package via composer:

composer require ghasedaksms/ghasedaksms-laravel

Usage

1- Put your apikey in .env file:

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 namespace App\Notifications; use Carbon\Carbon; use Ghasedak\DataTransferObjects\Request\InputDTO; use Ghasedak\DataTransferObjects\Request\ReceptorDTO; use Ghasedaksms\GhasedaksmsLaravel\Message\GhasedaksmsVerifyLookUp; use Ghasedaksms\GhasedaksmsLaravel\Notification\GhasedaksmsBaseNotification; use Illuminate\Bus\Queueable; class SendOtpToUser extends GhasedaksmsBaseNotification { use Queueable; public function __construct() { // } public function toGhasedaksms($notifiable): GhasedaksmsVerifyLookUp { $message = new GhasedaksmsVerifyLookUp(); $message->setSendDate(Carbon::now()); $message->setReceptors([new ReceptorDTO($notifiable->mobile, 'client referenceId')]); $message->setTemplateName('newOTP'); $message->setInputs([new InputDTO('code', '******')]); return $message; } }

4- Use SendOtpToUser

$user = new \App\Models\User(); $user->mobile = '0912*******'; $user->notify(new \App\Notifications\SendOtpToUser());

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

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

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

统计信息

  • 总下载量: 1.89k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04