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

ActiveLibrary

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

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

0.0.6(5y ago)359.1k↓45.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 1mo ago

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 80% 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

1866d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/672fbfa799365c6b8e334b066ad674e06ed4c6d68536ad2fe9be3bd565b5c601?d=identicon)[OwenMelbz](/maintainers/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.3k16.4M48](/packages/lab404-laravel-impersonate)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11812.4k21](/packages/kompo-kompo)[tomatophp/tomato

TomatoPHP is built to make it easy to develop web apps and API by generating files of CRUD operations and support helpers of tonnes of functions to make it easy to manage and use framework services.

1634.8k](/packages/tomatophp-tomato)[classiebit/eventmie

Run your own Events business with Eventmie Pro. Use it as event ticket selling website or event management platform on your own domain.

1872.0k](/packages/classiebit-eventmie)[tomatophp/tomato-admin

Tomato Admin Dashboard Build With FilamentPHP Theme for Laravel Splade

578.6k60](/packages/tomatophp-tomato-admin)[hapidjus/laravel-impersonate-ui

UI for 404labfr/laravel-impersonate

371.5k](/packages/hapidjus-laravel-impersonate-ui)

PHPackages © 2026

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