PHPackages                             t3chnik/verify-l4-mongolid - 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. t3chnik/verify-l4-mongolid

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

t3chnik/verify-l4-mongolid
==========================

A simple authentication bundle for Laravel 4. It features roles, permissions, password salting and is fully extendable.

v2.0.1(13y ago)1340MITPHPPHP &gt;=5.3.0

Since Mar 19Pushed 12y ago1 watchersCompare

[ Source](https://github.com/t3chnik/Verify-L4-mongolid)[ Packagist](https://packagist.org/packages/t3chnik/verify-l4-mongolid)[ Docs](http://docs.toddish.co.uk/verify-l4/)[ RSS](/packages/t3chnik-verify-l4-mongolid/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (9)Used By (0)

Verify - Laravel 4 Auth Package
===============================

[](#verify---laravel-4-auth-package)

---

A simple role/permission authentication package for Laravel 4

---

- Secure password storage with salt
- Role/permission based authentication
- Exceptions for intelligent handling of errors
- Configurable/extendable

---

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

[](#installation)

Add Verify to your composer.json file:

```
"require": {
	"toddish/verify": "2.0.*"
}

```

Now, run a composer update on the command line from the root of your project:

```
composer update

```

### Registering the Package

[](#registering-the-package)

Add the Verify Service Provider to your config in `app/config/app.php`:

```
'providers' => array(
	'Toddish\Verify\VerifyServiceProvider'
),
```

### Change the driver

[](#change-the-driver)

Then change your Auth driver to `'verify'` in `app/config/auth.php`:

```
'driver' => 'verify',
```

You may also change the `'model'` value to `'Toddish\Verify\Models\User'` if you want to be able to load Verify's User model when using `Auth::user()`.

Alternatively, you can simply create your own User model, and extend Verify's:

```
use Toddish\Verify\Models\User as VerifyUser;

class User extends VerifyUser
{
    // Code
}
```

### Publish the config

[](#publish-the-config)

Run this on the command line from the root of your project:

```
php artisan config:publish toddish/verify

```

This will publish Verify's config to `app/config/packages/toddish/verify/`.

You may also want to change the `'db_prefix'` value if you want a prefix on Verify's database tables.

### Migration

[](#migration)

Now migrate the database tables for Verify. Run this on the command line from the root of your project:

```
php artisan migrate --package="toddish/verify"

```

You should now have all the tables imported, complete with a sample user, called **admin**, with a password of **password**.

Usage
-----

[](#usage)

The package is intentionally lightweight. You add Users, Roles and Permissions like any other Model.

```
$user = new Toddish\Verify\Models\User;
$role = new Toddish\Verify\Models\Role;
$permission = new Toddish\Verify\Models\Permission;
```

etc.

**All models are in the namespace 'Toddish\\Verify\\Models'.**

The relationships are as follows:

- Roles have many and belong to Users
- Users have many and belong to Roles
- Roles have many and belong to Permissions
- Permissions have many and belong to Roles

Relationships are handled via the Eloquent ORM, too:

```
$role->permissions()->sync(array($permission->id, $permission2->id));
```

More information on relationships can be found in the [Laravel 4 Eloquent docs](http://four.laravel.com/docs/eloquent).

Basic Examples
--------------

[](#basic-examples)

```
// Create a new Permission
$permission = new Toddish\Verify\Models\Permission;
$permission->name = 'delete_user';
$permission->save();

// Create a new Role
$role = new Toddish\Verify\Models\Role;
$role->name = 'Moderator';
$role->level = 7;
$role->save();

// Assign the Permission to the Role
$role->permissions()->sync(array($permission->id));

// Create a new User
$user = new Toddish\Verify\Models\User;
$user->username = 'Todd';
$user->email = 'todd@toddish.co.uk';
$user->password = 'password'; // This is automatically salted and encrypted
$user->save();

// Assign the Role to the User
$user->roles()->sync(array($role->id));

// Using the public methods available on the User object
var_dump($user->is('Moderator')); // true
var_dump($user->is('Admin')); // false

var_dump($user->can('delete_user')); // true
var_dump($user->can('add_user')); // false

var_dump($user->level(7)); // true
var_dump($user->level(5, '&lt;=')); // false
```

---

Documentation
-------------

[](#documentation)

For full documentation, have a look at .

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 93.7% 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 ~8 days

Total

7

Last Release

4798d ago

Major Versions

v1.1.1 → v2.0.02013-05-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/1401a34a94f9d241fa307f22024049a92c96ed3544c460cf6f3688cd22eb6826?d=identicon)[t3chnik](/maintainers/t3chnik)

---

Top Contributors

[![Toddish](https://avatars.githubusercontent.com/u/361040?v=4)](https://github.com/Toddish "Toddish (59 commits)")[![arenowebdev](https://avatars.githubusercontent.com/u/996970?v=4)](https://github.com/arenowebdev "arenowebdev (2 commits)")[![t3chnik](https://avatars.githubusercontent.com/u/4659736?v=4)](https://github.com/t3chnik "t3chnik (2 commits)")

---

Tags

laravelauthverifyrolespermissions

### Embed Badge

![Health badge](/badges/t3chnik-verify-l4-mongolid/health.svg)

```
[![Health](https://phpackages.com/badges/t3chnik-verify-l4-mongolid/health.svg)](https://phpackages.com/packages/t3chnik-verify-l4-mongolid)
```

###  Alternatives

[toddish/verify

A simple authentication bundle for Laravel 4/5. It features roles, permissions, password salting and is fully extendable.

16520.8k1](/packages/toddish-verify)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6783.6k5](/packages/hasinhayder-tyro)[phpzen/laravel-rbac

Role based access control for Laravel 5

383.2k](/packages/phpzen-laravel-rbac)

PHPackages © 2026

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