Created
September 2, 2018 16:03
-
-
Save flexgrip/8688faa8fd78a19f15af63660637c66e to your computer and use it in GitHub Desktop.
Generic template function from bothelpers.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Generic template | |
*/ | |
public function buildMessageTemplateGeneric($message) { | |
# WORKS | |
$template = GenericTemplate::create() | |
->addElement( | |
Element::create($message->attachment->title) | |
->image($message->attachment->payload->url) | |
); | |
return $template; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment