PHPackages                             ahmedgomaaeid/message - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. ahmedgomaaeid/message

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

ahmedgomaaeid/message
=====================

send messages library

v1.1(7mo ago)02MITPHPPHP ^8.1

Since Oct 2Pushed 7mo agoCompare

[ Source](https://github.com/ahmedgomaaeid/send-message-package)[ Packagist](https://packagist.org/packages/ahmedgomaaeid/message)[ RSS](/packages/ahmedgomaaeid-message/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

Laravel Message Package
=======================

[](#laravel-message-package)

[![Awesome](https://camo.githubusercontent.com/2727609d8bfde9ba1a95be1449eb878bfafa4d76789ba05661857e2c8ac70fa1/68747470733a2f2f63646e2e7261776769742e636f6d2f73696e647265736f726875732f617765736f6d652f643733303566333864323966656437386661383536353265336136336531353464643865383832392f6d656469612f62616467652e737667)](https://github.com/sindresorhus/awesome)[![MIT License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://choosealicense.com/licenses/mit/)[![Made With Love](https://camo.githubusercontent.com/f5a909f5f91732b11808ef34f80f59151767ede05a248fcf11954f1f97180885/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d616465253230576974682d4c6f76652d6f72616e67652e737667)](https://github.com/chetanraj/awesome-github-badges)[![Laravel](https://camo.githubusercontent.com/36ab9eb40d419c375ec1c19e6d5fd0d5ae0aeb01372cc6b164966c412feecdad/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302532422d7265642e737667)](https://laravel.com)

A powerful Laravel package for sending messages to multiple messaging platforms with an elegant fluent API.

✨ Features
----------

[](#-features)

- 🚀 **Easy Integration** - Simple Laravel package installation
- 💬 **Multiple Platforms** - Support for various messaging services
- 🎯 **Fluent API** - Elegant method chaining for message composition
- 📝 **Rich Formatting** - Bold text, lists, line breaks, and more
- ⚙️ **Auto Configuration** - Automatic chat ID detection for Telegram
- 🔒 **Secure** - Environment-based configuration

📋 Requirements
--------------

[](#-requirements)

- PHP 8.1 or higher
- Laravel 10.0 or higher
- PHP ext-zip extension (for dependencies)

📦 Supported Platforms
---------------------

[](#-supported-platforms)

- [Telegram](https://telegram.org/) ✅
- More platforms coming soon...

🚀 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require ahmedgomaaeid/message
```

### Laravel Setup

[](#laravel-setup)

The package will automatically register its service provider. If you need to register it manually, add to `config/app.php`:

```
'providers' => [
    // Other providers...
    AhmedGomaaEid\Message\MessageServiceProvider::class,
],
```

⚙️ Configuration
----------------

[](#️-configuration)

### Telegram Configuration

[](#telegram-configuration)

1. **Add your bot token** to your `.env` file:

```
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
```

2. **Get your Chat ID** (First time setup):
    - Send any message to your Telegram bot
    - Visit: `https://your-app-url.com/telegram-chat-id-taker`
    - The chat ID will be automatically saved to your `.env` file

📖 Usage Examples
----------------

[](#-usage-examples)

### 🔹 Basic Telegram Message

[](#-basic-telegram-message)

```
use AhmedGomaaEid\Message\Classes\TelegramMessage;

$message = new TelegramMessage();
$message->addLine('Hello from Laravel!')
        ->addBoldText('This is bold text')
        ->send();
```

### 🔹 Rich Formatted Message

[](#-rich-formatted-message)

```
use AhmedGomaaEid\Message\Classes\TelegramMessage;

$message = new TelegramMessage();

// Create a list of items
$todoList = [
    'Complete project documentation',
    'Review pull requests',
    'Deploy to production',
    'Update team on progress'
];

$message->addBoldText('📋 Daily Tasks')
        ->addLine('Here are today\'s important tasks:')
        ->addList($todoList)
        ->addLine('')
        ->addLine('Please complete by end of day. 🎯')
        ->send();
```

### 🔹 System Notifications

[](#-system-notifications)

```
use AhmedGomaaEid\Message\Classes\TelegramMessage;

// Example: Order notification
$message = new TelegramMessage();
$message->addBoldText('🛒 New Order Received!')
        ->addLine('Order ID: #12345')
        ->addLine('Customer: John Doe')
        ->addLine('Amount: $199.99')
        ->addLine('Status: Processing')
        ->addLink('View Order', 'https://your-app-url.com/orders/12345')
        ->send();
```

### 🔹 Available Methods

[](#-available-methods)

```
$message = new TelegramMessage();

// Text formatting
$message->addLine('Regular text line');
$message->addBoldText('Bold text');

// Lists
$message->addList(['Item 1', 'Item 2', 'Item 3']);

// List with key-value pairs
$message->addListWithKeyValue(['Key1' => 'Value1', 'Key2' => 'Value2']);

// Hyperlinks
$message->addLink('Click Here', 'https://example.com');

// Send the message
$message->send();
```

🛠️ Available Methods
--------------------

[](#️-available-methods)

MethodDescriptionExample`addLine($text)`Add a regular text line`->addLine('Hello World')``addBoldText($text)`Add bold formatted text`->addBoldText('Important!')``addList($array)`Add a bulleted list`->addList(['A', 'B', 'C'])``addListWithKeyValue($array)`Add a list with key-value pairs`->addListWithKeyValue(['Key1' => 'Value1', 'Key2' => 'Value2'])``addLink($text, $url)`Add a hyperlink`->addLink('Click Here', 'https://example.com')``send()`Send the composed message`->send()`🔧 Troubleshooting
-----------------

[](#-troubleshooting)

### Common Issues

[](#common-issues)

**1. "Bot token not configured" error:**

- Ensure `TELEGRAM_BOT_TOKEN` is set in your `.env` file
- Verify the token is correct (get it from [@BotFather](https://t.me/botfather))

**2. "Chat ID not found" error:**

- Visit `/telegram-chat-id-taker` to set up chat ID
- Make sure you've sent at least one message to your bot first

**3. Messages not sending:**

- Check your internet connection
- Verify bot token permissions
- Ensure chat ID is correct

### Getting Help

[](#getting-help)

- Check the [Laravel Log](storage/logs/laravel.log) for detailed error messages
- Verify your `.env` configuration
- Test your bot token using Telegram's API directly

🎯 Use Cases
-----------

[](#-use-cases)

This package is perfect for:

- **System Notifications** - Server alerts, error notifications
- **Order Updates** - E-commerce order status updates
- **Daily Reports** - Automated daily/weekly summaries
- **User Notifications** - Account updates, reminders
- **Marketing Messages** - Promotional campaigns
- **Team Communication** - Development team notifications

📝 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

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

[](#-contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request

🙏 Credits
---------

[](#-credits)

Created by [Ahmed Gomaa Eid](https://github.com/ahmedgomaaeid)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance64

Regular maintenance activity

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

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

Every ~0 days

Total

2

Last Release

222d ago

PHP version history (2 changes)v1.0PHP &gt;=7.4

v1.1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f62d2d8b6d32de1d747e7abee16674f8947b9ba0785c08a18f39c6971308480?d=identicon)[ahmedgomaaeid](/maintainers/ahmedgomaaeid)

---

Top Contributors

[![ahmedgomaaeid](https://avatars.githubusercontent.com/u/103951772?v=4)](https://github.com/ahmedgomaaeid "ahmedgomaaeid (11 commits)")

### Embed Badge

![Health badge](/badges/ahmedgomaaeid-message/health.svg)

```
[![Health](https://phpackages.com/badges/ahmedgomaaeid-message/health.svg)](https://phpackages.com/packages/ahmedgomaaeid-message)
```

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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