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

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

frf/discord-notification
========================

Send message to webhook discord channel

1.0.14(5y ago)259MITPHPPHP ^7.2.5|^8.0

Since Apr 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/frf/discord-message)[ Packagist](https://packagist.org/packages/frf/discord-notification)[ RSS](/packages/frf-discord-notification/feed)WikiDiscussions main Synced 1w ago

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

Laravel Discord Message
=======================

[](#laravel-discord-message)

*Send messsage to discord hook*
-------------------------------

[](#send-messsage-to-discord-hook)

[![N|Solid](https://camo.githubusercontent.com/9101856b2a3a4b45df573d7f4ed3312daf6a6616cb12b24c9a1d75e9ad5ae53c/68747470733a2f2f636c6475702e636f6d2f645478705069396c44662e7468756d622e706e67)](https://nodesource.com/products/nsolid)

[![Build Status](https://camo.githubusercontent.com/dacafb09d4bf062fccb3dc244e5aaff769395d31d2cc8c61c9fee17d1b2ecdf6/68747470733a2f2f7472617669732d63692e6f72672f6a6f656d6363616e6e2f64696c6c696e6765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/joemccann/dillinger)

Project created to decouple the sending of messages to disagree, and in this way keep the project without fixed dependency. Sending messages through the discord hook can facilitate the communication of errors, warn when a tariff ends, among many benefits.

Features
--------

[](#features)

- Send message to channel discord with hook

Future Features
---------------

[](#future-features)

- Send message to multiple channel discord with hook
- Integration Notification Laravel

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

[](#installation)

Laravel Discord Message requires [PHP Laravel](https://laravel.com) v8+ to run.

Install the package

```
composer require frf/discord-notification
```

After install - Create Discord Hook

Open your channel config and create integration
-----------------------------------------------

[](#open-your-channel-config-and-create-integration)

[![App Screenshot](https://github.com/frf/images-apps/raw/main/discord-message/integration.png?raw=true)](https://github.com/frf/images-apps/blob/main/discord-message/integration.png?raw=true)

Add name your hook and choose your channel
------------------------------------------

[](#add-name-your-hook-and-choose-your-channel)

[![App Screenshot](https://github.com/frf/images-apps/raw/main/discord-message/generate.png?raw=true)](https://github.com/frf/images-apps/blob/main/discord-message/generate.png?raw=true)

Put end of file `.env` configuration link hook in your `.env`
-------------------------------------------------------------

[](#put-end-of-file-env-configuration-link-hook-in-your-env)

```
DISCORD_HOOK=https://discord.com/api/webhooks/4334343/XaFx43434343lGHYvQHoQO0ykhGRibx3w

```

### Exemple to use command line

[](#exemple-to-use-command-line)

```
php artisan discord:send_message Teste
php artisan discord:send_message Teste warning
```

### Exemple to use injection service,

[](#exemple-to-use-injection-service)

`Remembering that there is no better place on the controller 😅, I put it just as a practical example`

```
