PHPackages                             ahmedash95/users-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. ahmedash95/users-verification

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

ahmedash95/users-verification
=============================

Laravel Package for managing users verification.

0.0.2(8y ago)421MITPHP

Since Jun 20Pushed 8y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Laravel Users Verification
==========================

[](#laravel-users-verification)

This package contains a trait to support Eloquent Models Verification

```
$user = App\User::find(1);

// Generate token or get it if exists
$user->getToken();

// check if user is verified or not
$user->isVerified()

// check if token is valid for user
$token = 'random_token_generated_by_getToken()_method'
$user->verifyToken($token) // return true or false

// verify the user
if($user->verifyToken($token)) {
	$user->verify();
}

// remove user token
$user->flushToken();
```

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

[](#installation)

You can install the package via composer:

```
composer require ahmedash95/users-verification
```

Next up, the service provider must be registered:

```
// config/app.php
'providers' => [
    ...
    Ahmedash95\UsersVerification\UsersVerificationServiceProvider::class,

];
```

you must publish the migration file:

```
php artisan vendor:publish --provider="Ahmedash95\UsersVerification\UsersVerificationServiceProvider" --tag="migrations"
```

then run the migration command

```
php artisan migrate
```

Use verification in User model
------------------------------

[](#use-verification-in-user-model)

```
use Illuminate\Foundation\Auth\User as Authenticatable;

use Ahmedash95\UsersVerification\UsersVerification;

class User extends Authenticatable
{
    use UsersVerification;
```

Available Methods
-----------------

[](#available-methods)

### Get\\Generate token for user

[](#getgenerate-token-for-user)

The `getToken` method will return the user token string or generate it if it doesn't not exists.

```
public function getToken() : string
```

### Check user token

[](#check-user-token)

This method will verify if the given token is valid for the user

```
public function verifyToken(String $token) : bool
```

### Verify the user

[](#verify-the-user)

After checking if the token is valid you may want to activate user verification .. then you should use `verify` method

```
public function verify()
```

### Get user by token

[](#get-user-by-token)

If you want to validate your users using token you could use `findByToken` method

```
public static function findByToken($token)
```

this method return object of user or null if doesn't exists

### Remove user's token

[](#remove-users-token)

```
public function flushToken()
```

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Ahmed Ashraf](https://github.com/ahmedash95)
- [All Contributors](https://github.com/ahmedash95/users-verification/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

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

Total

2

Last Release

3251d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

ahmedash95laravelusersusers-verificationverification

### Embed Badge

![Health badge](/badges/ahmedash95-users-verification/health.svg)

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[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)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

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

PHPackages © 2026

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