Improve view errors.
This commit is contained in:
@@ -44,6 +44,13 @@ class View implements ArrayAccess {
|
||||
*/
|
||||
public static $cache = array();
|
||||
|
||||
/**
|
||||
* THe last view to be rendered.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public static $last;
|
||||
|
||||
/**
|
||||
* The Laravel view loader event name.
|
||||
*
|
||||
@@ -387,6 +394,8 @@ class View implements ArrayAccess {
|
||||
*/
|
||||
protected function load()
|
||||
{
|
||||
static::$last = array('name' => $this->view, 'path' => $this->path);
|
||||
|
||||
if (isset(static::$cache[$this->path]))
|
||||
{
|
||||
return static::$cache[$this->path];
|
||||
|
||||
Reference in New Issue
Block a user