1. Go to this page and download the library: Download rmsramos/change-user 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/ */
rmsramos / change-user example snippets
use Rmsramos\ChangeUser\ChangeUserPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
ChangeUserPlugin::make(),
]);
}
use Rmsramos\ChangeUser\ChangeUserPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
ChangeUserPlugin::make()
->showButton(fn () => auth()->user()->id === 1),
]);
}
use Rmsramos\ChangeUser\ChangeUserPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
ChangeUserPlugin::make()
->setModalHeading('Another modal heading'),
]);
}
use Rmsramos\ChangeUser\ChangeUserPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
ChangeUserPlugin::make()
->setIcon('heroicon-o-finger-print'),
]);
}
use Rmsramos\ChangeUser\ChangeUserPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
ChangeUserPlugin::make()
->showButton(fn () => auth()->user()->id === 1)
->setModalHeading('Another modal heading')
->setIcon('heroicon-o-finger-print'),
]);
}