From dbb18d59c1f0d2534653d28d2976aa9bbdc546c8 Mon Sep 17 00:00:00 2001 From: Kalle Palokankare Date: Tue, 7 May 2019 16:41:29 +0300 Subject: [PATCH] Method to add meta information when sending template (#9) --- src/Resources/Template.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Resources/Template.php b/src/Resources/Template.php index 91abd55..276859d 100644 --- a/src/Resources/Template.php +++ b/src/Resources/Template.php @@ -58,7 +58,7 @@ class Template extends ApiResource * Template constructor. * * @param array $attributes - * @param null $notific + * @param null $notific */ public function __construct(array $attributes, $notific = null) { @@ -123,6 +123,17 @@ public function channels(...$channels) return $this; } + /** + * @param array $meta + * @return $this + */ + public function meta(array $meta) + { + $this->data['meta'] = json_encode($meta); + + return $this; + } + /** * @return mixed */