PHP code example of dridihaythem / laravel-orange-sms-tunisia

1. Go to this page and download the library: Download dridihaythem/laravel-orange-sms-tunisia 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/ */

    

dridihaythem / laravel-orange-sms-tunisia example snippets


ORANGE_SMS_TUNISIA_AUTHORIZATION_HEADER="your_token_here"

    use DridiHaythem\OrangeSMSTunisia\Services\OrangeSMSTunisiaService;

    Route::get('/send-sms', function (OrangeSMSTunisiaService $service) {
        $response = $service->sendSms(29175235, "Hello, this is a test message.");

        // Handle the response as needed...

    });
    

    use DridiHaythem\OrangeSMSTunisia\Services\OrangeSMSTunisiaService;

    Route::get('/sms-balance', function (OrangeSMSTunisiaService $service) {
        return $service->getAvailableUnits()
    });
    

ORANGE_SMS_TUNISIA_DASHBOARD_ENABLE=true
ORANGE_SMS_TUNISIA_DASHBOARD_ROUTE=orange-sms-tunisia-dashboard

ORANGE_SMS_TUNISIA_ENABLE_LOG=false
ORANGE_SMS_TUNISIA_LOG_TABLE=orange_sms_tunisia_logs
bash
php artisan vendor:publish --provider="DridiHaythem\OrangeSMSTunisia\OrangeSMSTunisiaServiceProvider"