PHPackages                             owenmelbz/vue-impersonate - 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. owenmelbz/vue-impersonate

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

owenmelbz/vue-impersonate
=========================

Laravel 5.5+ helper and VueJS 2 component for lab404/laravel-impersonate

0.0.6(5y ago)3510.2k↓69.6%3MITPHP

Since Dec 24Pushed 5y ago1 watchersCompare

[ Source](https://github.com/OwenMelbz/vue-impersonate)[ Packagist](https://packagist.org/packages/owenmelbz/vue-impersonate)[ RSS](/packages/owenmelbz-vue-impersonate/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (7)Used By (0)

VueJS Frontend Component for integration for Laravel Impersonate
================================================================

[](#vuejs-frontend-component-for-integration-for-laravel-impersonate)

This package adds a really simple frontend component written as a self contained Vuejs 2 component to allow you users to easily impersonate others via the API provided by .

Preview
-------

[](#preview)

[![Preview](/docs/preview.jpg)](/docs/preview.jpg)

Usage
-----

[](#usage)

1. Install via composer `composer require owenmelbz/vue-impersonate`
2. Register the service provider (if the auto discovery does not work) - typically done inside the `app.php` providers array e.g `OwenMelbz\VueImpersonate\VueImpersonateServiceProvider::class`
3. There are 3 publishable components - the only `required` component is the javascript which you can publish with `php artisan vendor:publish` then select `vue-impersonate-javascript (required)`. This will copy the .vue component into `resources/js/components/vue-impersonate.vue` - feel free to move this.
4. You must then include the component in your javascript bundle, typically achieved from within an entry point such as `app.js` e.g `Vue.component('vue-impersonate', require('./components/vue-impersonate.vue'));`
5. Once published you should make sure you've set up laravel-impersonate correctly by including the correct traits, and methods and routes to allow impersonating.
6. Once laravel-impersonate is set up you should include the blade directive within your template `@vueImpersonate` - this should be housed within your vuejs container e.g `#app` - it will only render for users who possess the `canImpersonate` permissions.

Configuration
-------------

[](#configuration)

### Display name

[](#display-name)

You can change what is displayed in the dropdown by changing the `display_name_field` from within the published config - you can use accessors/mutators here or normal database columns.

### Custom vue directive

[](#custom-vue-directive)

If you want to rename the component from `vue-impersonate` you must publish the config file via `php artisan vendor:publish` and change it within the config under the `custom_directive` param.

### Custom user provider

[](#custom-user-provider)

By default laravel uses providers to log in users, this is defined within the `config/auth.php` then within the `providers` array. We use the class defined within the `model` property of the provider you define. By default it is called `users` so that we'll also uses the configured class to populate the list of users on the frontend.

### Custom list of users

[](#custom-list-of-users)

If you want more fine-grain control over which users show in the dropdown, you can set your own route and define it within the `custom_route` and we'll use that to display the users. You must return a JSON array with each user object containing at least an `id` and `display_name` field. e.g

```
[
    {
        id: 12,
        display_name: 'User X :: user.x@gmail.com',
    },
    {
        id: 14,
        display_name: 'User Y :: user.y@gmail.com',
    },
];
```

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~240 days

Recently: every ~300 days

Total

6

Last Release

1912d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1094740?v=4)[Owen Melbourne](/maintainers/OwenMelbz)[@OwenMelbz](https://github.com/OwenMelbz)

---

Top Contributors

[![OwenMelbz](https://avatars.githubusercontent.com/u/1094740?v=4)](https://github.com/OwenMelbz "OwenMelbz (16 commits)")[![lloy0076](https://avatars.githubusercontent.com/u/1174532?v=4)](https://github.com/lloy0076 "lloy0076 (2 commits)")

---

Tags

laravelimpersonateVue.jslab404

### Embed Badge

![Health badge](/badges/owenmelbz-vue-impersonate/health.svg)

```
[![Health](https://phpackages.com/badges/owenmelbz-vue-impersonate/health.svg)](https://phpackages.com/packages/owenmelbz-vue-impersonate)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k18.6M64](/packages/lab404-laravel-impersonate)[kamona/kui-laravel-breeze

Different UI for laravel/breeze

33735.6k2](/packages/kamona-kui-laravel-breeze)[franbarbalopez/mirror

Mirror is a Laravel package that handles user impersonation.

16326.7k](/packages/franbarbalopez-mirror)[tomatophp/filament-users

Manage your users with a highly customizable user resource for FilamentPHP with integration of filament-shield and filament-impersonate

91126.7k9](/packages/tomatophp-filament-users)[rickycezar/laravel-jwt-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

25125.2k](/packages/rickycezar-laravel-jwt-impersonate)[kineticamobile/lumki

Laravel User Management for Laravel 9 with Jetstream

7245.4k](/packages/kineticamobile-lumki)

PHPackages © 2026

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