rhyslees/nova-impersonating-banner 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rhyslees/nova-impersonating-banner

Composer 安装命令:

composer require rhyslees/nova-impersonating-banner

包简介

An impersonating banner for Nova 4

README 文档

README

  1. Displays a banner when impersonating
  2. Allows you to stop impersonating

image

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 我们能提供哪些服务?
定制开发 / 二次开发

基于 rhyslees/nova-impersonating-banner 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 26.75k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 14
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-04-08