1. Go to this page and download the library: Download tookantech/chapaar 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/ */
use TookanTech\Chapaar\Facades\Chapaar;
use TookanTech\Chapaar\SmsMessage;
$message = (new SmsMessage())->driver()
->setFrom('12345678')
->setTo('0912111111')
->setContent('Hello, this is a test message.');
$response = Chapaar::send($message);
use TookanTech\Chapaar\Facades\Chapaar;
use TookanTech\Chapaar\SmsMessage;
use TookanTech\Chapaar\Enums\Drivers;
$message = (new SmsMessage())
->driver(Drivers::SMSIR)
->setFrom('12345678')
->setTo('0912111111')
->setContent('Hello, this is a test message.');
$response = Chapaar::send($message);
$response = Chapaar::outbox(100);
use TookanTech\Chapaar\SmsChannel;
class InvoicePaid extends KavenegarBaseNotification
{
public function via($notifiable): array
{
return [SmsChannel::class];
}
public function toSms($notifiable)
{
return (new SmsMessage)->driver()
->setTemplate('verify')
->setTokens([123],[456])
}
}
class User extends Authenticatable
{
use Notifiable;
public function routeNotificationForSms($driver, $notification = null)
{
return $this->mobile;
}
}