carpool-logistics / laravel-heymarket
A Laravel package for Heymarket API
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/carpool-logistics/laravel-heymarket
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') ]; } }