承接 nhamtphat/laravel-backup-telegram-notifications 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

nhamtphat/laravel-backup-telegram-notifications

最新稳定版本:1.0.0

Composer 安装命令:

composer require nhamtphat/laravel-backup-telegram-notifications

包简介

Telegram notifications for spatie/laravel-backup

README 文档

README

Latest Version on Packagist Total Downloads License

A wrapper for spatie/laravel-backup to send beautified Telegram notifications. This package is a fork of hotrush/laravel-backup-telegram-notifications.

✨ Features

  • Beautified Notifications: Rich HTML-formatted Telegram messages with emojis and clear structure.
  • Easy Integration: Seamlessly works with the existing Spatie Backup notification system.
  • Customizable: Uses Blade views for notification templates, allowing for easy customization.

🚀 Installation

You can install the package via composer:

composer require nhamtphat/laravel-backup-telegram-notifications

⚙️ Configuration

1. Configure Telegram Bot

Add your Telegram Bot Token to your config/services.php file:

// config/services.php
'telegram-bot-api' => [
    'token' => env('TELEGRAM_BOT_TOKEN'),
],

2. Configure Backup Notifications

In your config/backup.php file, update the notifications section to use the Telegram channel and this package's notification classes.

// config/backup.php

use NotificationChannels\Telegram\TelegramChannel;
use NhamtPhat\SpatieBackup\Notifications\Notifiable;
use NhamtPhat\SpatieBackup\Notifications\Notifications\BackupHasFailedNotification;
use NhamtPhat\SpatieBackup\Notifications\Notifications\BackupWasSuccessfulNotification;
use NhamtPhat\SpatieBackup\Notifications\Notifications\CleanupHasFailedNotification;
use NhamtPhat\SpatieBackup\Notifications\Notifications\CleanupWasSuccessfulNotification;
use NhamtPhat\SpatieBackup\Notifications\Notifications\HealthyBackupWasFoundNotification;
use NhamtPhat\SpatieBackup\Notifications\Notifications\UnhealthyBackupWasFoundNotification;

'notifications' => [
    'notifications' => [
        BackupHasFailedNotification::class => [TelegramChannel::class],
        UnhealthyBackupWasFoundNotification::class => [TelegramChannel::class],
        CleanupHasFailedNotification::class => [TelegramChannel::class],
        BackupWasSuccessfulNotification::class => [TelegramChannel::class],
        HealthyBackupWasFoundNotification::class => [TelegramChannel::class],
        CleanupWasSuccessfulNotification::class => [TelegramChannel::class],
    ],

    'notifiable' => Notifiable::class,

    'telegram' => [
        'channel_id' => env('TELEGRAM_CHAT_ID'),
    ],
],

Don't forget to add TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID to your .env file.

🛠 Usage

Once configured, notifications will be sent automatically by the spatie/laravel-backup package whenever a backup event occurs.

📄 License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固