PHP code example of laracomponents / impersonation
1. Go to this page and download the library: Download laracomponents/impersonation 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/ */
laracomponents / impersonation example snippets
use LaraComponents\Impersonation\Traits\Impersonable;
class User
{
use Impersonable;
...
/**
* Optional method
* Default return the "impersonate_id"
**/
public function getImpersonatingKey()
{
return 'your session key here';
}
}