PHPackages                             horlerdipo/pretend - 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. horlerdipo/pretend

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

horlerdipo/pretend
==================

A simple package to impersonate users when building APIs with Laravel Sanctum, allowing administrators to generate temporary tokens and act on behalf of other users without using sessions.

v0.1.0(8mo ago)1520[4 PRs](https://github.com/Horlerdipo/pretend/pulls)MITPHPPHP ^8.1CI passing

Since Aug 23Pushed 1mo agoCompare

[ Source](https://github.com/Horlerdipo/pretend)[ Packagist](https://packagist.org/packages/horlerdipo/pretend)[ Docs](https://github.com/horlerdipo/pretend)[ GitHub Sponsors](https://github.com/Horlerdipo)[ RSS](/packages/horlerdipo-pretend/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (13)Versions (8)Used By (0)

Pretend
=======

[](#pretend)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9ef6730f2ee3c52a56f2402f984717d266e5b9522b52f16f87be1585c2068085/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f2f70726574656e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/horlerdipo/pretend)[![GitHub Tests Action Status](https://camo.githubusercontent.com/33e2d7ed6aeb273c57a9e56f060c727a6a9e69c365dd2607cb828258a8f4b4d7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f686f726c65726469706f2f70726574656e642f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/horlerdipo/pretend/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/198256050338f094e320c40979a37fa2b489356fc83f0b13b8a76d87ce59d15c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f686f726c65726469706f2f70726574656e642f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/horlerdipo/pretend/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/15f292c5e6a401b46dd7ef530c9ab0b1a4a95b0601300950becc44c0d4dd9e04/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686f726c65726469706f2f70726574656e642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/horlerdipo/pretend)

Pretend is a Laravel package for user impersonation, built on top of Laravel Sanctum, designed to help admins step into the shoes of their users. With Pretend, you can securely impersonate a user, browse your app exactly as they see it, and debug issues or provide support without needing their credentials.

Why Pretend?
------------

[](#why-pretend)

🔑 Sanctum-powered – integrates seamlessly with Laravel Sanctum’s personal access tokens.

🎭 True impersonation – experience the application from the user’s perspective.

🛡️ Secure by design – tokens, events, and middleware to keep impersonation safe and auditable.

⚡ Flexible storage – swap out the default database storage for your own implementation.

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 11.x or higher

Docs
----

[](#docs)

Find the complete documentation [here](https://pretend-horlerdipo.netlify.app/#/)

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Umar Oladipo](https://github.com/Horlerdipo)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance77

Regular maintenance activity

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 96.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

Unknown

Total

1

Last Release

263d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ce0cf63fd9e994acc511f86986eb60adc819180f1995d0ae4d37c8b6fb53916?d=identicon)[Nightingale](/maintainers/Nightingale)

---

Top Contributors

[![Horlerdipo](https://avatars.githubusercontent.com/u/37878400?v=4)](https://github.com/Horlerdipo "Horlerdipo (58 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelUmar Oladipopretend

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/horlerdipo-pretend/health.svg)

```
[![Health](https://phpackages.com/badges/horlerdipo-pretend/health.svg)](https://phpackages.com/packages/horlerdipo-pretend)
```

###  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)
