From f8dcb2c8dbbc73b81d75df176257910c7db5c5a6 Mon Sep 17 00:00:00 2001 From: Nahid Bin Azhar Date: Thu, 17 Oct 2019 18:03:12 +0600 Subject: [PATCH] improve get() method --- src/Presenter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Presenter.php b/src/Presenter.php index 3b469c0..0f997c1 100644 --- a/src/Presenter.php +++ b/src/Presenter.php @@ -178,6 +178,9 @@ public function toJson() : string */ public function get() : array { + if (count($this->generatedData) == 0) { + $this->generatedData = $this->handle(); + } return $this->generatedData; }