diego-drese/nova-backup-manager 问题修复 & 功能扩展

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

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

diego-drese/nova-backup-manager

最新稳定版本:V1.0.5

Composer 安装命令:

composer require diego-drese/nova-backup-manager

包简介

A Laravel Nova tool.

README 文档

README

A Laravel Nova 5 tool that allows administrators to manage application backups directly from the Nova interface.
Create, download, monitor, and delete backups in a beautiful UI.

This tool uses Laravel's Cache system to improve performance when loading backup data. When scheduling backup jobs via Laravel's scheduler, it's recommended to clear the cache after successful execution:

->onSuccess(function () {
    BackupCache::forgetBackupsConfig();
    BackupCache::forgetStatuses();
});

This ensures that the Nova UI always displays up-to-date backup information.

📦 Installation

Require the package via Composer:

  composer require diego-drese/nova-backup-manager

🔧 Register the Tool

In your NovaServiceProvider (or any custom Nova Tool registration), register the tool:

public function tools()
{
    return [
        // ...
        new \DiegoDrese\NovaBackupManager\NovaBackupManager,
    ];
}

⚙️ Publish the Configuration File

To customize permissions and behavior, publish the config file:

  php artisan vendor:publish --tag=nova-backup-manager-config

This will create the file:
config/nova-backup-manager.php

⚙️ Configuration Options

return [
    'polling' => true,
    'polling_interval' => 10, // in seconds
    'queue' => null, // queue to dispatch backup jobs

    'show_menu' => true,
    'create' => true,
    'delete' => true,
    'download' => true,

    // Optional: dynamically resolve permissions per user
    'resolve_permissions' => null,
];

🛡️ Customize Per-user Permissions

To customize how permissions are evaluated per user, you can publish and customize the permission resolver:

  php artisan vendor:publish --tag=nova-backup-manager-permissions

This will create the file:

app/Nova/BackupPermissionResolver.php

This will override the static show_menu, create, delete, and download flags dynamically for each logged-in user.

In your config/nova-backup-manager.php, point to the resolver:

  'resolve_permissions' => [\App\Nova\BackupPermissionResolver::class, 'resolve'],

🖥️ Features

  • Create full or partial (database/files only) backups
  • List and download backups per disk
  • Delete old backups
  • Monitor disk health and status
  • Live polling (configurable)

🖼️ UI Preview

img.png

img_1.png

📜 License

MIT © Diego Drese

统计信息

  • 总下载量: 513
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-15