PHP code example of carpool-logistics / laravel-heymarket
1. Go to this page and download the library: Download carpool-logistics/laravel-heymarket 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/ */
carpool-logistics / laravel-heymarket example snippets
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')
];
}
}
bash
php artisan vendor:publish --provider="CarpoolLogistics\Heymarket\HeymarketServiceProvider"