This commit is contained in:
Karim Qaderi 2019-08-12 19:23:36 +04:30 committed by GitHub
parent 324289a4d0
commit 2e53bb520d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 1 deletions

View File

@ -31,10 +31,32 @@ class ViewRenderEventManager
{
$this->params = $params ?? [];
Event::fire($eventName, $this->params);
Event::fire($eventName, $this);
return $this->templates;
}
/**
* get params
*
* @return array
*/
public function getParams()
{
return $this->params;
}
/**
* get param
*
* @param $name
*
* @return mixed
*/
public function getParam($name)
{
return optional($this->params)->{$name};
}
/**
* Add templates for render