PHPackages                             trafik8787/sms-verification-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. trafik8787/sms-verification-laravel

ActiveLibrary[API Development](/categories/api)

trafik8787/sms-verification-laravel
===================================

Provides endpoints for sending SMS to some phone number and it's verifying.

0.9.4(8y ago)057MITPHPPHP &gt;=5.5

Since May 4Pushed 4y ago1 watchersCompare

[ Source](https://github.com/trafik8787/sms-verification-laravel)[ Packagist](https://packagist.org/packages/trafik8787/sms-verification-laravel)[ RSS](/packages/trafik8787-sms-verification-laravel/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (6)Used By (0)

[![alt text](https://avatars0.githubusercontent.com/u/13040900?v=3&s=100)](https://avatars0.githubusercontent.com/u/13040900?v=3&s=100)

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 .

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.

```
'providers' => [
    ...
    \Phonedotcom\SmsVerification\SmsVerificationProvider::class,
    ...
]

```

Run the command:

```
php artisan vendor:publish --provider="Phonedotcom\SmsVerification\SmsVerificationProvider" --tag=config

```

Add SMS Verification endpoints to your routing file:

```
\Phonedotcom\SmsVerification\SmsVerificationProvider::registerRoutes($router);

```

The process for SMS verification is as follow:
----------------------------------------------

[](#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  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

[](#errors)

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

- `1XX` - code validation error
- `2XX` - something is not configured
- `3XX` - input format validation was failed
- `5XX` - code generating error
- `4XX` - code sending error
- `999` - any other server error, not related to SMS Verification library

### Notes

[](#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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Total

5

Last Release

3157d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea77c9f42b3343285066ca5d279672065267a879eb08ccfd9954bd3447327199?d=identicon)[trafik8787](/maintainers/trafik8787)

---

Top Contributors

[![trafik8787](https://avatars.githubusercontent.com/u/4068440?v=4)](https://github.com/trafik8787 "trafik8787 (13 commits)")[![charger88](https://avatars.githubusercontent.com/u/1718954?v=4)](https://github.com/charger88 "charger88 (10 commits)")[![waiyuen](https://avatars.githubusercontent.com/u/8965921?v=4)](https://github.com/waiyuen "waiyuen (1 commits)")

---

Tags

laravelsmslaravel 5phone verification

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/trafik8787-sms-verification-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/trafik8787-sms-verification-laravel/health.svg)](https://phpackages.com/packages/trafik8787-sms-verification-laravel)
```

###  Alternatives

[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[ardakilic/mutlucell

Mutlucell SMS API wrapper for sending sms text messages for Laravel

457.3k](/packages/ardakilic-mutlucell)[sboo/laravel5-mailjet

Mailjet driver for Laravel 5

154.6k](/packages/sboo-laravel5-mailjet)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
