1. Go to this page and download the library: Download tomatophp/filament-discord library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tomatophp / filament-discord example snippets
use \Filament\Notifications\Notification;
Notification::make()
->title('Hi')
->body('Welcome On The Moon!')
->sendToDiscord()
use \Filament\Notifications\Notification;
Notification::make()
->title('Hi')
->body('Welcome On The Moon!')
->sendToDiscord(image: "https://raw.githubusercontent.com/tomatophp/filament-discord/master/arts/3x1io-tomato-discord.jpg")
use TomatoPHP\FilamentDiscord\Traits\InteractsWithDiscord;
class User {
use InteractsWithDiscord;
}
use \Filament\Notifications\Notification;
Notification::make()
->title('Hi')
->body('Welcome On The Moon!')
->sendToDiscord($user)