定制 diego-drese/nova-backup-manager 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

diego-drese/nova-backup-manager

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

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固