rhyslees/nova-impersonating-banner
Composer 安装命令:
composer require rhyslees/nova-impersonating-banner
包简介
An impersonating banner for Nova 4
README 文档
README
- Displays a banner when impersonating
- Allows you to stop impersonating
Prerequisites
Ensure you are using the web middleware on your routes.
Ensure you have read the Nova Impersonation Docs
Installation
Require this package with composer.
composer require rhyslees/nova-impersonating-banner
php artisan vendor:publish --provider="RhysLees\NovaImpersonatingBanner\NovaImpersonatingBannerServiceProvider"
npm install && npm run build
Displaying the component
Add the following livewire component to your layouts app.blade.php and guest.blade.php
@livewire('nova-impersonating-banner')
or
<livewire:nova-impersonating-banner />
App Layout app.blade.php
<body class="font-sans antialiased"> <x-jet-banner /> <div class="min-h-screen bg-gray-100"> @livewire('nova-impersonating-banner') @livewire('navigation-menu') ...
Guest Layout guest.blade.php
<body> <div class="font-sans text-gray-900 antialiased"> @livewire('nova-impersonating-banner') {{ $slot }} ...
Customisation
The user you are impersonating is passed into the livewire component as $impersonating so you can select what information you wish to show to the user
<div class="flex-grow"> <p class="text-sm">{{ $impersonating->id }} - {{ $impersonating->name }}</p> <p class="text-sm">{{ $impersonating->email }}</p> </div>
To change the redirect url when you stop impersonating, you can edit the config file config/nova.php
/* |-------------------------------------------------------------------------- | Nova Impersonation Redirection URLs |-------------------------------------------------------------------------- | | This configuration option allows you to specify a URL where Nova should | redirect an administrator after impersonating another user and a URL | to redirect the administrator after stopping impersonating a user. | */ 'impersonation' => [ 'started' => '/', 'stopped' => '/', ],
rhyslees/nova-impersonating-banner 适用场景与选型建议
rhyslees/nova-impersonating-banner 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 26.75k 次下载、GitHub Stars 达 6, 最近一次更新时间为 2022 年 04 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 rhyslees/nova-impersonating-banner 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rhyslees/nova-impersonating-banner 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 26.75k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-04-08
