PHPackages                             koeker/laravel-discord-notification - 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. koeker/laravel-discord-notification

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

koeker/laravel-discord-notification
===================================

A Laravel package for sending notifications to Discord channels via webhooks.

v1.0.1(12mo ago)01.3k↑800%MITPHPPHP &gt;=8.0

Since Jun 27Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/KOeker/laravel-discord-notification)[ Packagist](https://packagist.org/packages/koeker/laravel-discord-notification)[ RSS](/packages/koeker-laravel-discord-notification/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

🚀 Laravel Discord Webhook
=========================

[](#-laravel-discord-webhook)

[![Latest Stable Version](https://camo.githubusercontent.com/b9a25fd21e3a223418d8cc943fd26ae04dfb4a50e73146e3e033ad02a51ab28d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b6f656b65722f6c61726176656c2d646973636f72642d6e6f74696669636174696f6e2e737667)](https://packagist.org/packages/koeker/laravel-discord-notification)[![Total Downloads](https://camo.githubusercontent.com/60290f2718cd99056e7014c98faa9a3f4d30b0ecacdf79278936eed631c8ffa1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b6f656b65722f6c61726176656c2d646973636f72642d6e6f74696669636174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/koeker/laravel-discord-notification)

A lightweight and simple Laravel package for sending Discord webhook embeds. Perfect for monitoring, alerts, and notifications.

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

[](#-features)

- **Full Embed Support** – Title, description, fields, footer, colors, and more
- **Custom Bot Name &amp; Avatar** – Set directly when initializing
- **Laravel Integration** – Service Provider, Facade, Auto-Discovery

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

[](#-installation)

```
composer require koeker/laravel-discord-notification
```

The package is auto-discovered by Laravel. No further setup required.

🚀 Quick Start
-------------

[](#-quick-start)

```
use Koeker\LaravelDiscordNotification\Facades\LaravelDiscordNotification;

$webhook = 'https://discord.com/api/webhooks/YOUR-WEBHOOK-URL';

$notification = LaravelDiscordNotification::setWebhookAgent(
    $webhook,
    'Laravel Bot',
    'https://example.png'
);

// Create embed
$notification->createEmbed()
    ->setTitle('🎉 Deployment Successful')
    ->setDescription('Version 2.1.0 has been successfully deployed!')
    ->setColor(0x00FF00)
    ->setFooter('CI/CD Pipeline')
    ->setTimestamp()
    ->addField('Server', 'Production', true)
    ->addField('Duration', '2min 34s', true)
    ->build();

$success = LaravelDiscordNotification::sendNotification($notification);
```

📚 Full Examples
---------------

[](#-full-examples)

### System Alert with Error Information

[](#system-alert-with-error-information)

```
$notification = LaravelDiscordNotification::setWebhookAgent(
    $webhook,
    'System Monitor',
    'https://example.com/alert-bot.png'
);

$notification->createEmbed()
    ->setTitle('🚨 System Alert')
    ->setDescription('Critical Error!')
    ->setColor(0xFF0000)  // Rot
    ->setFooter('Laravel Monitoring System')
    ->setTimestamp()
    ->addField('Code', '500 Internal Server Error', true)
    ->addField('Routes', '/api/users', true)
    ->addField('Server', 'web-01.production', true)
    ->build();

LaravelDiscordNotification::sendNotification($notification);
```

### Multiple Embeds in one Notification

[](#multiple-embeds-in-one-notification)

```
$notification = LaravelDiscordNotification::setWebhookAgent($webhook, 'Status Bot');

// Server Status
$notification->createEmbed()
    ->setTitle('✅ Server Online')
    ->setDescription('All Services running normal')
    ->setColor(0x00FF00)
    ->build();

// Performance Metrics
$notification->createEmbed()
    ->setTitle('📊 Performance')
    ->setDescription('System-Metrics')
    ->setColor(0x0099FF)
    ->addField('CPU', '25%', true)
    ->addField('RAM', '60%', true)
    ->addField('Disk', '45%', true)
    ->addField('Uptime', '99.9%', true)
    ->addField('Response Time', '50ms', true)
    ->addField('Active Users', '1,234', true)
    ->build();

LaravelDiscordNotification::sendNotification($notification);
```

### Inside a Laravel Controller

[](#inside-a-laravel-controller)

```
class MonitoringController extends Controller
{
    public function sendHealthCheck()
    {
        $webhook = env('DISCORD_WEBHOOK_URL');

        $notification = LaravelDiscordNotification::setWebhookAgent(
            $webhook,
            config('app.name') . ' Monitor',
            'https://example.png'
        );

        $notification->createEmbed()
            ->setTitle('💚 Health Check')
            ->setDescription('All Systems good')
            ->setColor(0x00FF00)
            ->setFooter('Automated Health Check')
            ->setTimestamp()
            ->addField('Database', '✅ Connected', true)
            ->addField('Cache', '✅ Working', true)
            ->addField('Queue', '✅ Processing', true)
            ->build();

        if (LaravelDiscordNotification::sendNotification($notification)) {
            return response()->json(['status' => 'Health check sent to Discord']);
        }

        return response()->json(['status' => 'Failed to send notification'], 500);
    }
}
```

### Inside a Job Laravel Queue

[](#inside-a-job-laravel-queue)

```
class SendDiscordAlert implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    protected $title;
    protected $message;
    protected $color;

    public function __construct($title, $message, $color = 0x0099FF)
    {
        $this->title = $title;
        $this->message = $message;
        $this->color = $color;
    }

    public function handle()
    {
        $webhook = env('DISCORD_WEBHOOK_URL');

        $notification = LaravelDiscordNotification::setWebhookAgent(
            $webhook,
            'Queue Worker',
            'https://example.com/worker-avatar.png'
        );

        $notification->createEmbed()
            ->setTitle($this->title)
            ->setDescription($this->message)
            ->setColor($this->color)
            ->setFooter('Laravel Queue System')
            ->setTimestamp()
            ->build();

        LaravelDiscordNotification::sendNotification($notification);
    }
}

// Job dispatch
SendDiscordAlert::dispatch('🎯 Task Completed', 'Import successfull', 0x00FF00);
```

🎨 Embed-Methods
---------------

[](#-embed-methods)

MethodsDescriptionExample`setTitle(string)`Title of the embed`->setTitle('🚀 Deployment')``setDescription(string)`Main text`->setDescription('Successfully deployed!')``setColor(int)`Color (hex)`->setColor(0x00FF00)``setFooter(string, ?string)`Footer with optional Icon`->setFooter('System', 'icon.png')``setTimestamp(?string)`Timestamp`->setTimestamp()``addField(string, string, bool)`Add a field`->addField('Status', 'OK', true)``setAuthor(string, ?string, ?string)`Author with link and icon`->setAuthor('Laravel', 'laravel.com')``setThumbnail(string)`Small picture top right`->setThumbnail('thumb.png')``setImage(string)`Big picture`->setImage('screenshot.png')`🎯 Colors
--------

[](#-colors)

```
// Success (Green)
->setColor(0x00FF00)

// Error (Red)
->setColor(0xFF0000)

// Warning (Orange)
->setColor(0xFFAA00)

// Info (Blue)
->setColor(0x0099FF)

// Discord Blurple
->setColor(0x5865F2)
```

🛠️ Requirements
---------------

[](#️-requirements)

- PHP &gt;= 8.0
- Laravel &gt;= 8.0
- GuzzleHttp &gt;= 7.0

📄 License
---------

[](#-license)

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

🙋‍♂️ Support
------------

[](#‍️-support)

Issues?

- 🐛 [Issues auf GitHub](https://github.com/KOeker/laravel-discord-notification/issues)

---

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance63

Regular maintenance activity

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

364d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/116636759?v=4)[KOeker](/maintainers/KOeker)[@KOeker](https://github.com/KOeker)

---

Top Contributors

[![KOeker](https://avatars.githubusercontent.com/u/116636759?v=4)](https://github.com/KOeker "KOeker (1 commits)")

### Embed Badge

![Health badge](/badges/koeker-laravel-discord-notification/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

252143.0k](/packages/erag-laravel-disposable-email)[spatie/laravel-export

Create a static site bundle from a Laravel app

672139.5k6](/packages/spatie-laravel-export)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1348.1k1](/packages/jasara-php-amzn-selling-partner-api)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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