PHPackages                             lmkhang10/telegram-backup-filamentphp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. lmkhang10/telegram-backup-filamentphp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lmkhang10/telegram-backup-filamentphp
=====================================

Telegram Backup with FilamentPHP

1.0.7(4mo ago)119[4 PRs](https://github.com/lmkhang10/telegram-backup-filamentphp/pulls)MITPHPPHP ^8.2CI passing

Since Jan 19Pushed 3mo agoCompare

[ Source](https://github.com/lmkhang10/telegram-backup-filamentphp)[ Packagist](https://packagist.org/packages/lmkhang10/telegram-backup-filamentphp)[ Docs](https://github.com/lmkhang10/telegram-backup-filamentphp)[ GitHub Sponsors](https://github.com/lmkhang10)[ RSS](/packages/lmkhang10-telegram-backup-filamentphp/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (16)Versions (7)Used By (0)

Telegram Backup with FilamentPHP
================================

[](#telegram-backup-with-filamentphp)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a767a54f663987e557e996b29256d8858d9a7761081dd9428afaa024e6c1982e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6d6b68616e6731302f74656c656772616d2d6261636b75702d66696c616d656e747068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lmkhang10/telegram-backup-filamentphp)[![GitHub Tests Action Status](https://camo.githubusercontent.com/946688fc86f85767ac92b7c323791630f401a1b123eb733c30b4f2a0cac74875/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6d6b68616e6731302f74656c656772616d2d6261636b75702d66696c616d656e747068702f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/lmkhang10/telegram-backup-filamentphp/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/7c235ab46e2784526843f1a09e1895730b141261e43281e3b2ec891eb759ac33/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6c6d6b68616e6731302f74656c656772616d2d6261636b75702d66696c616d656e747068702f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/lmkhang10/telegram-backup-filamentphp/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/b6021f03770721d3ffd62f3e0268d5edb0e96eb1164162b786d0f8f824bd9348/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6d6b68616e6731302f74656c656772616d2d6261636b75702d66696c616d656e747068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lmkhang10/telegram-backup-filamentphp)

A Laravel package that integrates Telegram backup functionality with FilamentPHP 3+. This package provides Filament resources for managing Telegram bots, chats, and backups, allowing you to automatically send Laravel backups to Telegram.

Demo
----

[](#demo)

[![Telegram Backup - 1](guide/telegram-backup-filamentphp-1.gif)](guide/telegram-backup-filamentphp-1.gif)[![Telegram Backup - 2](guide/telegram-backup-filamentphp-2.gif)](guide/telegram-backup-filamentphp-2.gif)[![Telegram Backup - 3](guide/telegram-backup-filamentphp-3.gif)](guide/telegram-backup-filamentphp-3.gif)[![Telegram Backup - 4](guide/telegram-backup-filamentphp-4.gif)](guide/telegram-backup-filamentphp-4.gif)Installation
------------

[](#installation)

You can install the package via composer:

```
composer require lmkhang10/telegram-backup-filamentphp
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="telegram-backup-filamentphp-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="telegram-backup-filamentphp-config"
```

### Environment Variables

[](#environment-variables)

Add the following environment variables to your `.env` file:

```
# Enable/disable automatic backup notifications to Telegram
TELEGRAM_BACKUP_ENABLED=true

# Chunk size for splitting large backup files (in MB, max 49)
# Default: 1 MB
BACKUP_TELEGRAM_CHUNK_SIZE=1
```

**Important:** You must configure Telegram bots and chats via the Filament admin panel. The package uses the database configuration exclusively - there are no environment variable fallbacks for bot tokens or chat IDs.

Usage
-----

[](#usage)

### Register Resources in Your Filament Panel

[](#register-resources-in-your-filament-panel)

In your Filament panel provider (e.g., `app/Providers/Filament/AdminPanelProvider.php`), add the Telegram resources:

```
use FieldTechVN\TelegramBackup\Filament\Resources\TelegramBotResource;
use FieldTechVN\TelegramBackup\Filament\Resources\TelegramChatResource;
use FieldTechVN\TelegramBackup\Filament\Resources\TelegramBackupResource;
use Filament\Navigation\NavigationBuilder;
use Filament\Navigation\NavigationGroup;
use Filament\Navigation\NavigationItem;

public function panel(Panel $panel): Panel
{
    return $panel
        // ... other configuration
        ->resources([
            TelegramBotResource::class,
            TelegramChatResource::class,
            TelegramBackupResource::class,
        ])
        ->navigation(function (NavigationBuilder $builder): NavigationBuilder {
            return $builder
                ->items([
                    // ... your other navigation items
                ])
                ->groups([
                    // Telegram group
                    NavigationGroup::make('TelegramGroup')
                        ->label(__('admin.nav.telegram.group'))
                        ->items([
                            NavigationItem::make('TelegramBotResource')
                                ->label(TelegramBotResource::getNavigationLabel())
                                ->icon(TelegramBotResource::getNavigationIcon())
                                ->url(fn(): string => TelegramBotResource::getUrl())
                                ->sort(1),

                            NavigationItem::make('TelegramChatResource')
                                ->label(TelegramChatResource::getNavigationLabel())
                                ->icon(TelegramChatResource::getNavigationIcon())
                                ->url(fn(): string => TelegramChatResource::getUrl())
                                ->sort(2),

                            NavigationItem::make('TelegramBackupResource')
                                ->label(TelegramBackupResource::getNavigationLabel())
                                ->icon(TelegramBackupResource::getNavigationIcon())
                                ->url(fn(): string => TelegramBackupResource::getUrl())
                                ->sort(3),
                        ]),
                ]);
        });
}
```

### How to Add a Chat ID

[](#how-to-add-a-chat-id)

To configure a Telegram group or channel for storing backups, follow these steps:

1. **Add Bot Token First**

    - Go to the Telegram Bots list page in your Filament admin panel
    - Create a new bot or edit an existing one
    - Add your Telegram bot token (obtained from [@BotFather](https://t.me/botfather) on Telegram)
    - Save the bot
2. **Add Bot to Group/Channel**

    - In Telegram, add the bot to the group or channel you want to use for cloud storage
    - Set the bot as an **Administrator** with the following permissions:
        - ✅ **Manage Messages** - Enable this (required)
        - ❌ **Change Channel Info** - Disable
        - ❌ **Manage Stories** - Disable
        - ❌ **Manage Direct Messages** - Disable
        - ❌ **Add Subscribers** - Disable
        - ❌ **Manage Video Chats** - Disable
        - ❌ **Add New Admins** - Disable

    > **Note:** Only "Manage Messages" permission is required. All other permissions should be disabled for security.
3. **Start Long Polling**

    - Go back to the Telegram Bots list page in Filament
    - Find your bot and click the "Start Long Polling" button
    - This will enable the bot to listen for messages and commands
4. **Run Setup Command**

    - In Telegram, go to the group/channel where you added the bot
    - Type the command: `/setup`
    - The bot will automatically:
        - Detect the chat information
        - Create or update the chat in the database
        - Link the chat to your bot
        - Send a confirmation message
5. **Done!**

    - The chat is now configured and ready to receive backups
    - You can verify the chat was added by checking the Telegram Chats list in Filament

### Features

[](#features)

- **Telegram Bot Management**: Create and manage Telegram bots for sending backups
- **Chat Management**: Manage Telegram chats/channels where backups are sent
- **Backup Tracking**: View and manage backups sent to Telegram
- **Automatic Backup Sending**: Integrates with Spatie Laravel Backup to automatically send backups to Telegram
- **Large File Splitting**: Automatically splits large backup files to comply with Telegram's file size limits

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [barryle](https://github.com/lmkhang10)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance79

Regular maintenance activity

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

132d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13195916?v=4)[Barry LE](/maintainers/lmkhang10)[@lmkhang10](https://github.com/lmkhang10)

---

Top Contributors

[![lmkhang10](https://avatars.githubusercontent.com/u/13195916?v=4)](https://github.com/lmkhang10 "lmkhang10 (53 commits)")

---

Tags

laravellmkhang10telegram-backup-filamentphp

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/lmkhang10-telegram-backup-filamentphp/health.svg)

```
[![Health](https://phpackages.com/badges/lmkhang10-telegram-backup-filamentphp/health.svg)](https://phpackages.com/packages/lmkhang10-telegram-backup-filamentphp)
```

###  Alternatives

[filament/filament

A collection of full-stack components for accelerated Laravel app development.

3829.6M3.6k](/packages/filament-filament)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

329530.5k29](/packages/codewithdennis-filament-select-tree)[biostate/filament-menu-builder

An Elegant Menu Builder for FilamentPHP

6528.1k2](/packages/biostate-filament-menu-builder)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[solution-forest/filament-simplelightbox

This is my package filament-simplelightbox

62100.3k1](/packages/solution-forest-filament-simplelightbox)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
