Skip to content

Instantly share code, notes, and snippets.

@flexgrip
Created September 2, 2018 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flexgrip/8688faa8fd78a19f15af63660637c66e to your computer and use it in GitHub Desktop.
Save flexgrip/8688faa8fd78a19f15af63660637c66e to your computer and use it in GitHub Desktop.
Generic template function from bothelpers.php
<?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