refactored welcome pages.
This commit is contained in:
@@ -59,7 +59,14 @@ class View {
|
||||
|
||||
foreach (array(EXT, BLADE_EXT) as $extension)
|
||||
{
|
||||
if (file_exists($path = VIEW_PATH.$view.$extension)) return $path;
|
||||
if (file_exists($path = VIEW_PATH.$view.$extension))
|
||||
{
|
||||
return $path;
|
||||
}
|
||||
elseif (file_exists($path = SYS_VIEW_PATH.$view.$extension))
|
||||
{
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
|
||||
throw new \Exception("View [$view] does not exist.");
|
||||
@@ -145,10 +152,6 @@ class View {
|
||||
{
|
||||
if (is_null(static::$composers)) static::$composers = require APP_PATH.'composers'.EXT;
|
||||
|
||||
// The shared composer is called for every view instance. This allows the
|
||||
// convenient binding of global view data or partials within a single method.
|
||||
if (isset(static::$composers['shared'])) call_user_func(static::$composers['shared'], $view);
|
||||
|
||||
if (isset(static::$composers[$view->view]))
|
||||
{
|
||||
foreach ((array) static::$composers[$view->view] as $key => $value)
|
||||
|
||||
Reference in New Issue
Block a user