https://github.com/miloudimohamed/impersonate
Flexible impersonating Laravel package.
https://github.com/miloudimohamed/impersonate
impersonation laravel
Last synced: 3 months ago
JSON representation
Flexible impersonating Laravel package.
- Host: GitHub
- URL: https://github.com/miloudimohamed/impersonate
- Owner: MiloudiMohamed
- Created: 2017-12-09T09:51:02.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-16T18:09:45.000Z (about 7 years ago)
- Last Synced: 2025-01-08T21:37:12.427Z (5 months ago)
- Topics: impersonation, laravel
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Impersonate package for Laravel.
Flexible impersonating Laravel package.## stage 1
first of all pull the package through Composer.
```bash
composer require devmi/impersonate
```Next, if you're using older Laravel version than 5.5, include the service provider within your `config/app.php` file.
(otherwise ignore this step)```php
'providers' => [
Devmi\Impersonate\ImpersonateServiceProvider::class,
];
```## Stage 2
Add the middleware to `App\Http\Middleware\Kernel.php`
```php
protected $middlewareGroups = [
...
\Devmi\Impersonate\Middleware\Impersonate::class,
]
```
## Stage 3
Public the configuration so you can custom this package depending on your needs.```bach
php artisan vendor:publich --tag=impersonate
```The file generated would be found under `config/impersonate.php`
# Usage
You can visit `http://your-domain/admin/impersonate`.
Enter the user email address you want to impersonate and you're done.
### Note
> `@impersonating` blade directive is already provided so you can display `stop impersonating` button to quit the impersonation.> Hit ```route('impersonate.destroy')``` to destroy your impersonation session.
That's it.
# Contributing
PR's are very welcome, Thanks.