PHP code example of hapidjus / laravel-impersonate-ui
1. Go to this page and download the library: Download hapidjus/laravel-impersonate-ui library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
hapidjus / laravel-impersonate-ui example snippets
composer
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Lab404\Impersonate\Models\Impersonate;
class User extends Authenticatable
{
use Notifiable,
Impersonate;
}
return [
/**
* Enable Laravel Impersonate UI
*
* Laravel Impersonate UI is enabled by default when in debug
*
*/
'enabled' => env('APP_DEBUG',false),
/**
* Users allowed to impersonate
*
* Array of user emails, i.e ['[email protected]'] or null for all
*
*/
'users_allowed_to_impersonate' => ['[email protected]'],
/**
* Position of icon.
*
* Supported: "bottom-right", "bottom-left", "top-left", "top-right"
*
*/
'icon_position' => 'bottom-right',
/**
* Show Impersonate button.
*
* Trying to save some clicks?
* Then this is the option for you! Select a user and BOOM -
* form submitted - user impersonated. No need to click any
* pesky buttons.
*
*/
'show_button' => true,
/**
* Globally IDs or null for none
*
*/
'users_exclude' => null,
];
@
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.