View debugging

Submitted by davestewart - 9 years ago

A couple of view creators that inject variables or text into views

// inject $viewName variable into  views
View::creator('*', function ($view) 
{
    View::share('viewName', $view->getName());
});

// debug view name in views
View::creator('*', function ($view) 
{
    echo '<pre class="debug viewname">' . $view->getName() . '</pre>';
});