tkg-apps/eskiz-sms-bundle

Installs: 43

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 0

Type:symfony-bundle

v1.0.4 2023-11-14 11:00 UTC

This package is auto-updated.

Last update: 2024-04-14 11:56:49 UTC


README

Installation

Install the package

composer req tkg-apps/eskiz-sms-bundle

Add to config/bundles.php

TkgApps\EskizSmsSender\EskizSmsBundle::class => ['all' => true],

Add next lines to your .env file

###> sms sender ###
ESKIZ_EMAIL=john.doe@mail.com
ESKIZ_PASSWORD=password_of_eskiz
ESKIZ_FROM=4546
ESKIZ_SMS_SEND_LINK=https://notify.eskiz.uz/api/message/sms/send
ESKIZ_GET_TOKEN_LINK=https://notify.eskiz.uz/api/auth/login
###< sms sender ###

How to use

You need to use this service in construct method of class

Example of simple using

class MyClass 
{
    public function __construct(private SmsSender $sender) 
    {
    }
    
    public function send(): void
    {
        $this->sender->sendMessage('998123456789', 'Hello Mario');
    }
}