codecamplao/telbiz

Services about Telecom

v1.0.03 2022-07-26 01:18 UTC

This package is auto-updated.

Last update: 2025-03-27 17:04:58 UTC


README

Installation

Begin by installing this package through Composer. Just run following command to terminal-

composer require codecamplao/telbiz

You can also edit your project's composer.json file to require codecamplao/telbiz.

"require": {
    "codecamplao/telbiz": "^1.0"
}

Next, update Composer from the Terminal:

composer update

Once this operation completes, the final step is to add the service provider. Open config/app.php, and add a new item to the providers array.

'providers' => [
    // ...
    CodeCampLAO\TelBiz\TelBizServiceProvider::class,
]

Next, Add more config on environment file. Open .env, and add a new three config like below.

TELBIZ_BASE_URI=""
TELBIZ_CLIENT_ID=""
TELBIZ_CLIENT_SECRET=""

Example to use

protected $telbiz_sms;
public function __construct()
{
    $this->telbiz_sms = new TelBizSMS();
}

public function index(): Response
{
    return $this->telbiz_sms->sendSmsService(TitleEnum::Default, '20xxxxxxxx', 'Hello Telbiz');
}

Example response:

{
    "response": {
        "code": "SUCCESS_OPERATION",
        "message": "Success",
        "success": true,
        "detail": "Success"
    },
    "key": {
        "partitionKey": "16512253832870000",
        "rangeKey": "16538405678928228"
    }
}