PHPackages                             hizbul/laravel-sms-verification - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. hizbul/laravel-sms-verification

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

hizbul/laravel-sms-verification
===============================

Send SMS to verify your phone number in laravel.

v1.2(6y ago)245425[1 issues](https://github.com/hizbul25/laravel-sms-verification/issues)MITPHP

Since Apr 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/hizbul25/laravel-sms-verification)[ Packagist](https://packagist.org/packages/hizbul/laravel-sms-verification)[ RSS](/packages/hizbul-laravel-sms-verification/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (4)Used By (0)

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

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

Server is written in PHP using the Laravel framework.

Installation
------------

[](#installation)

Run following command:

```
composer require hizbul/laravel-sms-verification

```

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

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

```

Run the command:

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

```

Add SMS Verification endpoints to your routing file:

```
\Hizbul\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" : "+88019194560**"}`
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: 123456)
4. In order to verify the code, send a Get /sms-verification API to `https://api.example.com/sms-verification/123456/+88019194560**`
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
3. If you found any caching issue, then use any other cache driver than `files`.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~186 days

Total

3

Last Release

2216d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4696198f6dfa84a6d2ae1075878bdd5138907cb816e7826a30f935e0be5d1e3e?d=identicon)[hizbul](/maintainers/hizbul)

---

Top Contributors

[![hizbul25](https://avatars.githubusercontent.com/u/4462574?v=4)](https://github.com/hizbul25 "hizbul25 (3 commits)")

---

Tags

laravel-sms-senderlaravel-sms-verificationonnorokom-sms-servicesms-codesms-verificationsms verificationSMS Verification LaravelSMS Verification OnnoRokom

### Embed Badge

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

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[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)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)

PHPackages © 2026

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