Improve view errors.

This commit is contained in:
Taylor Otwell
2012-09-26 16:20:56 -04:00
parent 633c2bde83
commit b043482905
2 changed files with 23 additions and 2 deletions

View File

@@ -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];