carpool-logistics / laravel-heymarket
There is no license information available for the latest version (1.0.9) of this package.
A Laravel package for Heymarket API
1.0.9
2024-10-17 13:52 UTC
Requires
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
README
A Laravel package for Heymarket API integration.
Installation
composer require carpool-logistics/laravel-heymarket
Configuration
Publish the configuration file:
php artisan vendor:publish --provider="CarpoolLogistics\Heymarket\HeymarketServiceProvider"
Set your Heymarket API key in the .env
file:
HEYMARKET_API_KEY=your_api_key
HEYMARKET_CREATOR_ID=creator_id
HEYMARKET_INBOX_ID=inbox_id
Usage
Use the package in your Laravel notifications:
use CarpoolLogistics\Heymarket\HeymarketChannel; use CarpoolLogistics\Heymarket\HeymarketMessage; class OrderShipped extends Notification { public function via($notifiable) { return [HeymarketChannel::class]; } public function toHeymarket($notifiable) { return [ HeymarketMessage::create() ->to($notifiable->phone_number) ->body('Your order has been shipped!') ->creatorId('your_creator_id') ->inboxId('your_team_id'), HeymarketMessage::create() ->to($notifiable->phone_number) ->body('Your order tracking number is 12345') ->inboxId('your_inbox_id') ->creatorId('your_creator_id') ->mediaUrl('https://images.com/image') ]; } }