gizburdt / talk
Send notifications to recipients
0.3.0
2026-09-19 08:44 UTC
Requires
- php: ^8.3
- illuminate/http: ^12.0||^13.0
- illuminate/notifications: ^12.0||^13.0
- illuminate/support: ^12.0||^13.0
Requires (Dev)
- laravel/pint: ^1.0
- orchestra/testbench: ^11.2
- pestphp/pest: ^3.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-19 08:44:29 UTC
README
Send notifications to recipients
Installation
You can install the package via composer:
composer require gizburdt/talk
Usage
Discord
Create a webhook in your Discord channel settings. Return DiscordWebhookChannel::class from via() and add a toDiscord() method to your notification:
use Gizburdt\Talk\Discord\DiscordEmbed; use Gizburdt\Talk\Discord\DiscordMessage; use Gizburdt\Talk\Discord\DiscordWebhookChannel; public function via(object $notifiable): array { return [DiscordWebhookChannel::class]; } public function toDiscord(object $notifiable): DiscordMessage { return DiscordMessage::make('Deployment finished') ->username('Deploy bot') ->embed(fn (DiscordEmbed $embed) => $embed ->title('Production') ->color('#22c55e') ->field('Duration', '42s', inline: true)); }
Return the webhook URL from routeNotificationFor('discord') on your notifiable:
public function routeNotificationForDiscord(): string { return $this->discord_webhook_url; }
On-demand notifications work too:
Notification::route('discord', $webhookUrl)->notify(new Deployed);
A failed request (for example an invalid payload) throws an Illuminate\Http\Client\RequestException.
Testing
composer test