diff --git a/src/Blade.php b/src/Blade.php index 3fe28d0..ee5efc9 100644 --- a/src/Blade.php +++ b/src/Blade.php @@ -17,6 +17,11 @@ class Blade */ protected $cachePath; + /** + * @var Dispatcher|null + */ + protected $events; + /** * @var array */ @@ -35,8 +40,8 @@ class Blade } $this->viewPaths = $viewPaths; $this->cachePath = $cachePath; + $this->events = $events; $this->attributes = $attributes; - $this->renderer = new \Philo\Blade\Blade($viewPaths, $cachePath, $events); } /** @@ -164,6 +169,7 @@ class Blade $data = array_merge($this->attributes, $data); - return $this->renderer->view()->make($template, $data)->render(); + $renderer = new \Philo\Blade\Blade($this->viewPaths, $this->cachePath, $this->events); + return $renderer->view()->make($template, $data)->render(); } } \ No newline at end of file