You can pull in the package via composer:
composer require zarulizham/OneWaySMS
Then add this line to config/app.php
in providers
OneWaySMS\SmsServiceProvider::class,
Store username and password credentials in .env
or simply put in make()
(see example below)
ONEWAY_USERNAME=
ONEWAY_PASSWORD=
use OneWaySMS\SMS
SMS::to("0123456789")->message("Hello there!")->send();
There is no need to use make() if credential stored in .env
use OneWaySMS\SMS
SMS::make([
'username' => 'yourusernamehere',
'password' => 'yourpasswordhere',
])->to("0123456789")->message("Hello there!")->send();