PHP code example of alighale / sms

1. Go to this page and download the library: Download alighale/sms library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

alighale / sms example snippets


'providers' => [
	 // for laravel 5.8 and below
	 \Serjik\Sms\SmsServiceProvider::class,
];

    /**  
     * sms driver 
     * [ 'kavenegar', 'ghasedak', ... ] 
     */  
    'driver' => env('SMS_DRIVER'),  
  
  
    /**  
     * drivers config 
     */  
    'drivers' => [
      
     /**  
      * for install this service on your app run this: 
      *                      composer sedak' => [  
         'api_key' => "ghasedak api key",  
         'line_number' => "10008566",  
//            'any_parameter' => 'any value',  
     ],  
  
//        EXAMPLE  
//        'your_driver' => [  
//            'parameters' => '',  
//            'provider' => \App\Sms\YourServiceName::class,  
//        ],  
  
  ],

//	\Serjik\Sms\Facades\Sms

/** @var BaseSmsDriver $result */
$result = Sms::to('09210125463')->send('test package');

/** @var BaseSmsDriver $result */
$result = Sms::to(['09210484017', ...])->send('test package');

/** @var BaseSmsDriver $result */
$result = Sms::to(['09210484017', ...])
	->send(['test package', ....]);

$result = Sms::driver('driver_name')
	->to('number or array of numbers')
	->send('message or array of messages');

php artisan vendor:publish