PHPackages                             mekramy/verification-code - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. mekramy/verification-code

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

mekramy/verification-code
=========================

easy verification code using cache for laravel

v1.0.1(6y ago)16MITPHPPHP ^7.0

Since Apr 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mekramy/verification-code)[ Packagist](https://packagist.org/packages/mekramy/verification-code)[ RSS](/packages/mekramy-verification-code/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Create Verification Code
========================

[](#create-verification-code)

**Note:** Verification code instance must created using laravel **service container** or **dependency injection**

```
$vc = app(\MEkramy\VerificationCode\VerificationCode::class);
```

**Note (Global/Private Mode)** If validation key mode set to private, generated verification code is only available for current ip!

**Note** Last parameter on all methods determine that the verification code is global(set to true) or private(set to false)!

Create New Verification Code
----------------------------

[](#create-new-verification-code)

To create a new code you need to call `put` method.

**Example:** Generate a verification code called **verify\_email** with **12345** value and **5** min expiry:

```
$vc->put('verify_email', '12345', 5); // Global
$vc->put('verify_email_for_current_ip_only', '45678', 5, false); // private
```

Get Verification Code
---------------------

[](#get-verification-code)

**Note:** get method return `null` if code is expired or not exists.

```
$vc->get('verify_email'); # > 12345
$vc->get('not_exists'); # > null
```

Check If Verification Code Exists And Not Expired
-------------------------------------------------

[](#check-if-verification-code-exists-and-not-expired)

```
$vc->exists('verify_email'); # > true
$vc->exists('not_exists'); # > false
```

Delete Verification Code
------------------------

[](#delete-verification-code)

```
$vc->remove('verify_email');
$vc->get('verify_email'); # > null
$vc->exists('verify_email'); # > false
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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 ~3 days

Total

2

Last Release

2231d ago

### Community

Maintainers

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

---

Tags

laravelverification Code

### Embed Badge

![Health badge](/badges/mekramy-verification-code/health.svg)

```
[![Health](https://phpackages.com/badges/mekramy-verification-code/health.svg)](https://phpackages.com/packages/mekramy-verification-code)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[spatie/laravel-honeypot

Preventing spam submitted through forms

1.6k6.0M60](/packages/spatie-laravel-honeypot)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[proengsoft/laravel-jsvalidation

Validate forms transparently with Javascript reusing your Laravel Validation Rules, Messages, and FormRequest

1.1k2.3M49](/packages/proengsoft-laravel-jsvalidation)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

759569.4k13](/packages/wendelladriel-laravel-validated-dto)

PHPackages © 2026

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