Download the PHP package gashey/laravel-mobiverse-ussd without Composer

On this page you can find all versions of the php package gashey/laravel-mobiverse-ussd. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-mobiverse-ussd

Mobiverse USSD plugin for Laravel

Latest Release on GitHub Total Downloads

About

This is a package to help you integrate the Mobiverse USSD service into your Laravel application. Users will be able to access your application on USSD with codes like *1234# from their phones.

This package uses code from https://github.com/jowusu837/hubtel-ussd-plugin-laravel created by Victor James Owusu.

Installation

Require the gashey/laravel-mobiverse-ussd package in your composer.json and update your dependencies:

Add the LaravelMobiverseUssd\UssdServiceProvider to your providers array:

Usage

Your application should now have an endpoint for USSD access. You can use the Mobiverse USSD Simulator to test your application. Supply your application url as: http://your-application.com/ussd

Customization

A simple USSD flow comes with this plugin so you can immediately test to see if your setup is working. You can create custom USSD flows by creating Activities. Start by creating a new folder in your app directory called USSD. This is where you will store all your USSD related logic.

A USSD activity is just a php class that extends the UssdActivity class. An example of an activity class is below:

An activity class must implement 2 methods: run() and next().

The run() method is the main entry point for the activity and must always return $this.

The next() must return a reference to the next activity to be executed. You can do this by simply returning a string with the full namespace of the next activity class or you can use the ::class approach to have php resolve it for you.

You have access to the current request $this->request, the response to be sent $this->response, and the current USSD session $this->session from within the activity.

The request and response properties exposes all the properties of a USSD request and response respectively.

The session property is an array. Note that the session is implemented on top of your existing Laravel cache. It allows you to persist state throughout your USSD session. You can store a value in the session like so: $this->session['name'] = 'Jane Deer', and retrieve it elsewhere like so: $name = $this->session['name'].

Once you have created your activiy files, you need to set your entry point activity in the config file as shown in the next section.

Configuration

The defaults are set in config/ussd.php. Publish the config using this command:

License

Released under the MIT License, see LICENSE.


All versions of laravel-mobiverse-ussd with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.3
nesbot/carbon Version ^2.18
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gashey/laravel-mobiverse-ussd contains the following files

Loading the files please wait ....