for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace NotificationChannels\Engage;
class EngageMessage
{
/**
* Notification url.
*
* @var string
*/
protected $url;
* Notification message.
protected $body;
* Notification icon.
protected $icon;
* Notification title.
protected $subject;
public function __construct($body = '')
$this->body = $body;
}
* Create a message.
* @param string $body
* @return static
public static function create($body = '')
return new static($body);
* Set the message body.
* @param string $value
* @return $this
public function body($value)
$this->body = $value;
return $this;
* Set the message subject.
public function subject($value)
$this->subject = $value;
* Set the message url.
public function url($value)
$this->url = $value;
* Set the message icon.
public function icon($value)
$this->icon = $value;
* Get message as array.
* @return array
public function toArray()
$message = [
'url' => $this->url,
'title' => $this->subject,
'message' => $this->body,
];
if ($this->icon) {
$message['image_url'] = $this->icon;
return $message;