PHPackages                             nomanhameed/laravel-discord-notify - 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. nomanhameed/laravel-discord-notify

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

nomanhameed/laravel-discord-notify
==================================

A Laravel package for sending notifications to Discord channels via webhooks with rich embed support.

v1.0.2(5mo ago)0398↓50%MITPHPPHP ^8.1CI failing

Since Jul 15Pushed 5mo agoCompare

[ Source](https://github.com/NomanHameed/laravel-discord-notify)[ Packagist](https://packagist.org/packages/nomanhameed/laravel-discord-notify)[ RSS](/packages/nomanhameed-laravel-discord-notify/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (5)Used By (0)

Laravel Discord Notify
======================

[](#laravel-discord-notify)

[![Latest Version on Packagist](https://camo.githubusercontent.com/64a47ef6e442f8ae68efcea43cf5cb797fc92a6aa16b9954f453bc2e2694b2d9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f6d616e68616d6565642f6c61726176656c2d646973636f72642d6e6f746966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nomanhameed/laravel-discord-notify)[![Total Downloads](https://camo.githubusercontent.com/023df7ec6653c6f76ab3d1e6a9e354db7aee81630b4d995f464a14bddfdda6d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6f6d616e68616d6565642f6c61726176656c2d646973636f72642d6e6f746966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nomanhameed/laravel-discord-notify)[![License](https://camo.githubusercontent.com/5efc87598fd8ac83d2c54cc9f7e9ff9f964938a183c08952ec07c55f2c7b822f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e6f6d616e68616d6565642f6c61726176656c2d646973636f72642d6e6f746966792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nomanhameed/laravel-discord-notify)

A Laravel package for sending notifications to Discord channels via webhooks with rich embed support.

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require nomanhameed/laravel-discord-notify
```

The package will automatically register itself.

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=discord-notifications-config
```

Add your Discord webhook URLs to your `.env` file:

```
DISCORD_GENERAL_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN
DISCORD_ALERTS_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN
DISCORD_LOGS_WEBHOOK_URL=https://discord.com/api/webhooks/YOUR_WEBHOOK_ID/YOUR_WEBHOOK_TOKEN

# Optional settings
DISCORD_DEFAULT_USERNAME="Laravel Bot"
DISCORD_TIMEOUT=10
DISCORD_LOG_ERRORS=true
DISCORD_THROW_EXCEPTIONS=false
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

```
use NomanHameed\DiscordNotify\Facades\Discord;

// Send a simple message
Discord::sendToChannel('general', 'Hello from Laravel!');

// Send with embeds
$embed = Discord::createEmbed(
    'New Order',
    'Order #12345 has been placed',
    0x00ff00,
    [
        Discord::createField('Customer', 'John Doe', true),
        Discord::createField('Amount', '$99.99', true),
    ]
);

Discord::sendToChannel('orders', null, [$embed]);
```

### Using the Service

[](#using-the-service)

```
use NomanHameed\DiscordNotify\Services\DiscordService;

class OrderController extends Controller
{
    public function store(Request $request, DiscordService $discord)
    {
        // ... create order logic

        $discord->sendToChannel('orders', "New order: #{$order->id}");
    }
}
```

### Advanced Usage

[](#advanced-usage)

```
// Send to multiple channels
Discord::sendToMultipleChannels(['general', 'alerts'], 'System maintenance in 5 minutes');

// Send directly to webhook
Discord::sendToWebhook($webhookUrl, 'Direct message');

// Create rich embeds
$embed = Discord::createEmbed(
    title: 'System Alert',
    description: 'High CPU usage detected',
    color: 0xff0000,
    fields: [
        Discord::createField('Server', 'web-01', true),
        Discord::createField('CPU Usage', '95%', true),
    ],
    footer: 'Monitoring System',
    thumbnail: 'https://example.com/alert-icon.png'
);

Discord::sendToChannel('alerts', null, [$embed]);
```

### Using Notifications

[](#using-notifications)

```
use NomanHameed\DiscordNotify\Notifications\DiscordNotification;

// In your notification class
public function toDiscord($notifiable)
{
    return (new DiscordNotification())
        ->content('Your order has been shipped!')
        ->to(config('discord-notifications.channels.orders.webhook_url'))
        ->username('Order Bot')
        ->embeds([
            Discord::createEmbed('Order Shipped', 'Tracking: 1234567890')
        ]);
}
```

Features
--------

[](#features)

- ✅ Send messages to multiple Discord channels
- ✅ Rich embed support
- ✅ Custom usernames and avatars per channel
- ✅ Text-to-speech support
- ✅ Laravel notification integration
- ✅ Facade support
- ✅ Configurable error handling
- ✅ Timeout configuration

Getting Discord Webhook URLs
----------------------------

[](#getting-discord-webhook-urls)

1. Go to your Discord server
2. Right-click on the channel
3. Select "Edit Channel"
4. Go to "Integrations" → "Webhooks"
5. Click "Create Webhook"
6. Copy the webhook URL

Configuration Options
---------------------

[](#configuration-options)

The `config/discord-notifications.php` file contains all configuration options:

- `default_username`: Default bot username
- `default_avatar_url`: Default bot avatar
- `timeout`: Request timeout in seconds
- `channels`: Array of channel configurations
- `log_errors`: Whether to log errors
- `throw_exceptions`: Whether to throw exceptions on failure

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

[](#contributing)

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

Issues
------

[](#issues)

If you discover any issues, please report them via [GitHub Issues](https://github.com/nomanhameed/laravel-discord-notify/issues).

Credits
-------

[](#credits)

- [Noman Hameed](https://github.com/NomanHameed)

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance71

Regular maintenance activity

Popularity16

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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 ~70 days

Total

3

Last Release

162d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13073548?v=4)[Noman Hameed](/maintainers/NomanHameed)[@NomanHameed](https://github.com/NomanHameed)

---

Top Contributors

[![NomanHameed](https://avatars.githubusercontent.com/u/13073548?v=4)](https://github.com/NomanHameed "NomanHameed (15 commits)")

---

Tags

laravelnotificationswebhookdiscord

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nomanhameed-laravel-discord-notify/health.svg)

```
[![Health](https://phpackages.com/badges/nomanhameed-laravel-discord-notify/health.svg)](https://phpackages.com/packages/nomanhameed-laravel-discord-notify)
```

###  Alternatives

[laravel-notification-channels/discord

Laravel notification driver for Discord.

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

Discord Notification Channel for laravel.

94122.8k](/packages/awssat-discord-notification-channel)[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[snoeren-development/laravel-discord-webhook-channel

Send notifications to a Discord webhook.

1549.8k1](/packages/snoeren-development-laravel-discord-webhook-channel)[usamamuneerchaudhary/filament-notifier

A powerful notification system for FilamentPHP that handles multi-channel notifications with template management, scheduling, and real-time delivery. Built for developers who need enterprise-grade notifications without the complexity.

321.1k](/packages/usamamuneerchaudhary-filament-notifier)

PHPackages © 2026

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