quanle / laravel-td-notification-channel
Treasure Data Notification Channel for Laravel
Installs: 521
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/quanle/laravel-td-notification-channel
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.9.2
- illuminate/notifications: ^10.0|^11.0
Requires (Dev)
- mockery/mockery: ^1.6.12
- pestphp/pest: ^v3.7.4
- phpunit/phpunit: ^11.5.3
This package is not auto-updated.
Last update: 2026-01-10 05:41:44 UTC
README
Treasure Data notifications channel for Laravel
This package fork from mkohei/laravel-td-notification-channel
This package makes it easy to send Treasure Data using the Laravel notification system and the Treasure Data Postback API.
Contents
Installation
composer require quanle/laravel-td-notification-channel
Usage
Now you can use the channel in your via() method inside the notification:
use QuanLe\LaravelTdNotificationChannel\TreasureDataChannel; use QuanLe\LaravelTdNotificationChannel\TreasureDataMessage; use Illuminate\Notifications\Notification; class ProjectCreated extends Notification { public function via($notifiable) { return [TreasureDataChannel::class]; } public function toTreasureData($notifiable) { return TreasureDataMessage::create() ->data([ 'param1' => 'value', 'param2' => 1234, ]) ->apikey('YOUR_WRITE_ONLY_KEY') ->database('your_db') ->table('your_table'); } }
To store notifications in the appropriate regions, databases, and tables, define a routeNotificationForTreasureData method on your notifiable entity. This should return the Postback API endpoint for your region.
public function routeNotificationForTreasureData() { return 'https://in.treasuredata.com'; }
Testing
composer test