PHP code example of gashey / laravel-mobiverse-ussd

1. Go to this page and download the library: Download gashey/laravel-mobiverse-ussd 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/ */

    

gashey / laravel-mobiverse-ussd example snippets


Gashey\LaravelMobiverseUssd\ServiceProvider::class,

namespace App\Ussd\Activities;

use App\Ussd\Activities\MenuSelection;
use Gashey\LaravelMobiverseUssd\Lib\UssdActivity;
use Gashey\LaravelMobiverseUssd\Lib\UssdResponse;

class HomeActivity extends UssdActivity
{
    public function run() {
        $this->response->Type = UssdResponse::RELEASE;
        $this->response->Message = 'Ussd is working!';
        return $this;
    }
    
    public function next() {
        return MenuSelection::class;
    }

}

return [
    "home" => \App\Ussd\Activities\HomeActivity::class
];