From 7f64e76ad1b2b08d75d55195cecf2e885243947d Mon Sep 17 00:00:00 2001 From: jm-factorin Date: Mon, 23 Jul 2018 15:34:37 +0800 Subject: [PATCH] Add json template view --- src/JsonView.php | 16 ++++++++++++++++ src/TemplateView.php | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/JsonView.php diff --git a/src/JsonView.php b/src/JsonView.php new file mode 100644 index 0000000..45b91d4 --- /dev/null +++ b/src/JsonView.php @@ -0,0 +1,16 @@ +data); + } +} diff --git a/src/TemplateView.php b/src/TemplateView.php index 7081f9c..92e50a4 100644 --- a/src/TemplateView.php +++ b/src/TemplateView.php @@ -22,7 +22,7 @@ public function build() $this->set('__contents__', parent::build()); $this->render($this->template); - return $this->build(); + return $this->extract(); } /**