Download the PHP package trafik8787/sms-verification-laravel without Composer

On this page you can find all versions of the php package trafik8787/sms-verification-laravel. 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 sms-verification-laravel

alt text

This library contains a set of two simple server endpoints for doing phone number verification via SMS.

SMS is done via phone.com API and in fact this code is intended to demonstrate real world use-case for using the phone.com API. All available Phone.com API's are defined at https://apidocs.phone.com.

Server is written in PHP using the Laravel framework.

Installation

Once this library is installed you need to register the service provider. Open config/app.php and find the providers key.

Run the command:

Add SMS Verification endpoints to your routing file:

The process for SMS verification is as follow:

  1. Use the POST /sms-verification to send the code to a mobile device
  2. Use the GET /sms-verification/{code}/{mobilePhoneNumber} to verify the code

For example, if an app wants to send an authorization code to a cell phone 855-123-8765

  1. Send a POST /sms-verification API to URL https://api.example.com/sms-verification with JSON body {"phone_number" : "+18551238765"}
  2. The API returns {"success":true,"description":"OK","expires_at": 1495120612} if the code is sent. expires_at is actual time of code expiration.
  3. The cell phone will receive a 6-digit code (for example: 782025)
  4. In order to verify the code, send a Get /sms-verification API to https://api.example.com/sms-verification/782025/+18551238765
  5. The API returns:
    • On success: {"success":true,"description":"OK","expires_at": 1495120612}
    • On failure: {"success":false,"description":"Wrong code"}

Errors

If an exception was thrown during the SMS verification process, output contains field error.

Notes

  1. The authorization code sent is only valid for 10 minutes
  2. The code can be verified only once. After the first success, it will be invalidated

All versions of sms-verification-laravel with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
guzzlehttp/guzzle Version 6.1.*
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 trafik8787/sms-verification-laravel contains the following files

Loading the files please wait ....