PHPackages                             waheed4399/laravel-action-service-trait - 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. waheed4399/laravel-action-service-trait

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

waheed4399/laravel-action-service-trait
=======================================

A simple Laravel package to create actions, traits and services using artisan commands

v1.0.0(1y ago)03MITPHPPHP ^7.1|^8.0

Since May 29Pushed 1y agoCompare

[ Source](https://github.com/AhmedWeb2022/laravel-action-service-trait)[ Packagist](https://packagist.org/packages/waheed4399/laravel-action-service-trait)[ RSS](/packages/waheed4399-laravel-action-service-trait/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Great! Here's the updated and detailed `README.md` for your **Laravel Backup Service** package, including the section on how to send the Google Drive backup link via Telegram:

---

Laravel Backup Service
======================

[](#laravel-backup-service)

[![Latest Version on Packagist](https://camo.githubusercontent.com/11707aa5da93e989c352fc19f16fc71d9f9bdc862859809e679cd0cce81eee33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61686d65647765622f6c61726176656c2d6261636b75702d736572766963652e737667)](https://packagist.org/packages/ahmedweb/laravel-backup-service)[![License: MIT](https://camo.githubusercontent.com/aeeb6fb1eba822e89981a3d388e1e4c0b082cc092d45cf9b2830aef5f2a211e0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f61686d65647765622f6c61726176656c2d6261636b75702d736572766963652e737667)](LICENSE.md)

A Laravel package that simplifies application backups using Google Drive storage, provides Artisan commands to manage them, and sends the latest backup link directly to your Telegram group.

---

🚀 Features
----------

[](#-features)

- Upload Laravel backups to **Google Drive**
- Send **backup download link to Telegram**
- Automatically **store and manage backup links**
- Remove **old backup files** from Google Drive
- Clean and readable service structure
- Easy-to-use Artisan commands

---

📦 Installation
--------------

[](#-installation)

Install the package using Composer:

```
composer require ahmedweb/laravel-backup-service
```

---

🛠️ Configuration
----------------

[](#️-configuration)

### 1. Environment Variables

[](#1-environment-variables)

Add the following to your `.env` file:

```
FILESYSTEM_CLOUD=google

GOOGLE_DRIVE_CLIENT_ID=your-google-client-id
GOOGLE_DRIVE_CLIENT_SECRET=your-google-client-secret
GOOGLE_DRIVE_REFRESH_TOKEN=your-google-refresh-token
GOOGLE_DRIVE_FOLDER_ID=your-google-folder-id
# Optional
GOOGLE_DRIVE_FOLDER=

TELEGRAM_BOT_TOKEN=your-telegram-bot-token
TELEGRAM_CHAT_ID=your-group-chat-id
```

---

### 2. Filesystem Configuration

[](#2-filesystem-configuration)

In `config/filesystems.php`, add the Google Drive disk:

```
'google_drive' => [
    'driver' => 'google',
    'clientId' => env('GOOGLE_DRIVE_CLIENT_ID'),
    'clientSecret' => env('GOOGLE_DRIVE_CLIENT_SECRET'),
    'refreshToken' => env('GOOGLE_DRIVE_REFRESH_TOKEN'),
    'folder' => env('GOOGLE_DRIVE_FOLDER'),
    'folderId' => env('GOOGLE_DRIVE_FOLDER_ID'),
],
```

---

💬 Telegram Setup
----------------

[](#-telegram-setup)

To enable Telegram backup link notifications:

### Step-by-step:

[](#step-by-step)

1. **Create a bot**

    - Go to [BotFather](https://t.me/BotFather) on Telegram
    - Use `/newbot` to create a bot
    - Save the **bot token**
2. **Create a Telegram group**

    - Add the bot to the group
    - Mention the bot once in the group to activate it
3. **Get your group chat ID**

    - Use a Telegram API tool like `@userinfobot` or your own bot's message logs
    - Or temporarily send a message from your bot and check the logs for `chat.id`
4. **Add to `.env`**:

    ```
    TELEGRAM_BOT_TOKEN=123456:ABC-YourBotToken
    TELEGRAM_CHAT_ID=-1001234567890
    ```

Once configured, your bot will be able to post backup links directly to your group.

---

🧪 Artisan Commands
------------------

[](#-artisan-commands)

CommandDescription`php artisan backup:store-latest-link`Stores the latest backup file link and sends it via Telegram`php artisan backup:delete-old`Deletes all older backup files from Google Drive`php artisan backup:clean-drive`Cleans backups on Google Drive based on retentionYou can schedule these in `app/Console/Kernel.php`:

```
$schedule->command('backup:store-latest-link')->daily();
$schedule->command('backup:delete-old')->weekly();
```

---

📁 File Structure
----------------

[](#-file-structure)

```
laravel-backup-service/
├── src/
│   ├── Commands/
│   │   ├── StoreLatestBackupLink.php
│   │   ├── DeleteOldBackupFiles.php
│   │   └── CleanGoogleDriveBackups.php
│   ├── Services/
│   │   └── GoogleDriveBackupService.php
│   ├── Providers/
│   │   └── BackupServiceProvider.php
├── config/
│   └── filesystems.php (merged if needed)

```

---

📜 Requirements
--------------

[](#-requirements)

PackageVersionPHP^8.2Laravel^11.31`spatie/laravel-backup`^9.3`google/apiclient`^2.15`irazasyed/telegram-bot-sdk`^3.15`masbug/flysystem-google-drive-ext`^2.4`yaza/laravel-google-drive-storage`^4.1---

🤝 Contributing
--------------

[](#-contributing)

Feel free to fork this package, suggest changes, or submit PRs. Any improvements are welcome!

---

📜 License
---------

[](#-license)

Licensed under the [MIT license](LICENSE.md).

---

🧑‍💻 Author
----------

[](#‍-author)

**Ahmed Web**📧 🌍 [GitHub Profile](https://github.com/ahmedweb)

---

Would you like this `README.md` saved to your project directory or formatted for publishing on GitHub/Packagist?

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance47

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

400d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/edfc332e309dc9b3dc3b613d66e2ae09f1a70d1867212d211a92da593ace0067?d=identicon)[AhmedWeb2022](/maintainers/AhmedWeb2022)

---

Top Contributors

[![AhmedWeb2022](https://avatars.githubusercontent.com/u/99670518?v=4)](https://github.com/AhmedWeb2022 "AhmedWeb2022 (5 commits)")

---

Tags

phplaravellaravel 7laravel 8laravel 9generatorservicegithubcommandtraitsactionopen-source

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/waheed4399-laravel-action-service-trait/health.svg)

```
[![Health](https://phpackages.com/badges/waheed4399-laravel-action-service-trait/health.svg)](https://phpackages.com/packages/waheed4399-laravel-action-service-trait)
```

###  Alternatives

[prevailexcel/laravel-action-service-trait

A simple Laravel package to create actions, traits and services using artisan commands

143.5k](/packages/prevailexcel-laravel-action-service-trait)[victorybiz/geoip-location

Get the geographical location of website visitors based on their IP addresses. Support Laravel and PHP (Non-Laravel) Project.

23167.8k2](/packages/victorybiz-geoip-location)[prevailexcel/laravel-nowpayments

A Laravel Package for NOWPayments

1418.7k](/packages/prevailexcel-laravel-nowpayments)

PHPackages © 2026

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