Looking to hire Laravel developers? Try LaraJobs

laravel-sms-gateway-ghasedak maintained by misaf

Description
Ghasedak SMS gateway driver for Laravel.
Last update
2026/07/04 11:52 (dev-master)
License
Downloads
1

Comments
comments powered by Disqus

Laravel SMS Gateway Ghasedak Driver

Ghasedak driver package for misaf/laravel-sms-gateway.

This package registers the ghasedak driver. The core package provides the manager, facade, driver contract, shared configuration file, and SmsSent event.

Requirements

  • PHP 8.2+
  • Laravel 10, 11, 12, or 13
  • misaf/laravel-sms-gateway

Installation

composer require misaf/laravel-sms-gateway-ghasedak

Laravel package discovery registers the driver service provider automatically.

Configuration

Publish the core configuration file if it has not already been published:

php artisan vendor:publish --tag=sms-gateway-config

Set the default driver and Ghasedak credentials in .env:

SMS_GATEWAY_DRIVER=ghasedak
SMS_GATEWAY_GHASEDAK_APIKEY=your-api-key
SMS_GATEWAY_GHASEDAK_LINENUMBER=3000xxxx
SMS_GATEWAY_GHASEDAK_TIMEOUT=10
SMS_GATEWAY_GHASEDAK_CONNECT_TIMEOUT=5

The driver reads from the ghasedak key in config/sms_gateway.php:

'ghasedak' => [
    'apiKey'          => env('SMS_GATEWAY_GHASEDAK_APIKEY', ''),
    'linenumber'      => env('SMS_GATEWAY_GHASEDAK_LINENUMBER'),
    'timeout'         => (int) env('SMS_GATEWAY_GHASEDAK_TIMEOUT', env('SMS_GATEWAY_TIMEOUT', 10)),
    'connect_timeout' => (int) env('SMS_GATEWAY_GHASEDAK_CONNECT_TIMEOUT', env('SMS_GATEWAY_CONNECT_TIMEOUT', 5)),
],

Usage

use Misaf\LaravelSmsGateway\Facade\SmsGateway;

SmsGateway::driver('ghasedak')->send()->post('sms/send/simple', [
    'message'  => 'Hello',
    'receptor' => '09123456789',
]);

Ghasedak requests are sent to https://api.ghasedak.me/v2/ with the configured API key in the apikey header.

Events

After a request receives a response, the core package dispatches Misaf\LaravelSmsGateway\Events\SmsSent with the driver name, request, and response.

Testing

composer test

License

MIT