PHPackages                             web-id/ail - 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. web-id/ail

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

web-id/ail
==========

Authentication page to change user easily in debug mode

1.0.2(3y ago)21.3k[2 PRs](https://github.com/web-id-fr/Ail/pulls)MITPHPPHP ^8.1

Since Nov 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/web-id-fr/Ail)[ Packagist](https://packagist.org/packages/web-id/ail)[ Docs](https://github.com/web-id/ail)[ RSS](/packages/web-id-ail/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (13)Versions (8)Used By (0)

AIL - Authentication with Impersonate guarded by a Lion
=======================================================

[](#ail---authentication-with-impersonate-guarded-by-a-lion)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5034c793d4066ac9106209af93a53f13934d8373891fa8364a649c43ca227245/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7765622d69642f61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/web-id/ail)[![Total Downloads](https://camo.githubusercontent.com/0f1b31defa17242a6b4426f9d6dab9571797105a59adabc844e61c1506ff952f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7765622d69642f61696c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/web-id/ail)

Authentication page to change user easily

[![Ail homepage](https://github.com/web-id-fr/Ail/raw/main/src/commun/ail.png?raw=true "Ail homepage")](https://github.com/web-id-fr/Ail/blob/main/src/commun/ail.png?raw=true)

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

[](#installation)

### 1/ Composer

[](#1-composer)

You can install the package via composer:

```
composer require web-id/ail
```

### 2/ Package installation

[](#2-package-installation)

Install the package (config file and views) with this command :

```
php artisan ail:install
```

### 3/ Configuration

[](#3-configuration)

Update the config, especially `guard` and `allowedEnv`.

This is the content of the published config files:

```
return [
    /*
    |--------------------------------------------------------------------------
    | Route configuration
    |--------------------------------------------------------------------------
    |
    | These values will change the route configuration for the application routes.
    | You can define the prefix, the name and set your own middleware on it.
    | Web middleware is required for authentication and CanImpersonate for security.
    |
    */

    'routes' => [
        'prefix' => 'ail',
        'name' => 'ail',
        'middlewares' => [
            'web',
            CanImpersonate::class,
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Guards to display
    |--------------------------------------------------------------------------
    |
    | This value is a list of guards that you want to display and impersonate. You
    | need to set the name on key and the service builder on value. The service
    | builder is required for search bar on view. By default, you can use
    | SearchUser::class that search on `name` attribute. You are free and encouraged
    | to create your own service.
    |
    */

    'guards' => [
        'web' => SearchUser::class,
    ],

    /*
    |--------------------------------------------------------------------------
    | Allowed environment security
    |--------------------------------------------------------------------------
    |
    | This value is a list of environments authorized for this package. It will
    | use APP_ENV. WARNING : This package is not recommended on risky environments
    | like production or preprod with sensitive data.
    */

    'allowedEnv' => [
        'local',
        'preproduction',
    ],

    /*
    |--------------------------------------------------------------------------
    | Pagination
    |--------------------------------------------------------------------------
    |
    | This value is the pagination number for view.
    |
    */

    'perPage' => 15,
];
```

### 4/ Update Models

[](#4-update-models)

Add `Impersonate` Trait on Authenticatable Models you want to impersonate.

```
class User extends Authenticatable
{
    use Impersonate;
}
```

### 5/ Update Views

[](#5-update-views)

You can add your own logic on resources/views/vendors/ail.

By default, it will display the `name` attribute.

### 6/ More options

[](#6-more-options)

See :

WARNING : Don't forget to set authorization for who can impersonate :

By default all users can be impersonated.

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Leo Tiollier](https://github.com/LTiollier)

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 87% 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 ~1 days

Total

4

Last Release

1266d ago

Major Versions

0.0.1 → 1.0.02022-11-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/cefb02231110e801ec332d70b4bb7f1df97a12f095e0c1ea887d3273d74cde78?d=identicon)[web-id](/maintainers/web-id)

---

Top Contributors

[![LTiollier](https://avatars.githubusercontent.com/u/16253697?v=4)](https://github.com/LTiollier "LTiollier (20 commits)")[![wijourdil](https://avatars.githubusercontent.com/u/12596207?v=4)](https://github.com/wijourdil "wijourdil (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

authenticationdebugguardimpersonatelaravelpackagelaravelweb-idail

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/web-id-ail/health.svg)

```
[![Health](https://phpackages.com/badges/web-id-ail/health.svg)](https://phpackages.com/packages/web-id-ail)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k1.7M41](/packages/jeffgreco13-filament-breezy)[spatie/laravel-login-link

Quickly login to your local environment

4381.2M1](/packages/spatie-laravel-login-link)[ryangjchandler/laravel-cloudflare-turnstile

A simple package to help integrate Cloudflare Turnstile.

438896.6k2](/packages/ryangjchandler-laravel-cloudflare-turnstile)[spatie/laravel-passkeys

Use passkeys in your Laravel app

444494.4k16](/packages/spatie-laravel-passkeys)

PHPackages © 2026

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