moved error pages to application directory.
This commit is contained in:
parent
5e95f05d9b
commit
4283e7ec98
|
@ -20,7 +20,6 @@
|
|||
define('ROUTE_PATH', APP_PATH.'routes/');
|
||||
define('SESSION_PATH', STORAGE_PATH.'sessions/');
|
||||
define('SYS_CONFIG_PATH', SYS_PATH.'config/');
|
||||
define('SYS_VIEW_PATH', SYS_PATH.'views/');
|
||||
define('VIEW_PATH', APP_PATH.'views/');
|
||||
|
||||
/**
|
||||
|
|
|
@ -70,21 +70,12 @@ protected function path($view)
|
|||
{
|
||||
$view = str_replace('.', '/', $view);
|
||||
|
||||
// Application views take priority over system views, so we will return the
|
||||
// application version of the view if both exists. Also, we need to check
|
||||
// for Blade views using the Blade extension. The Blade extension gives
|
||||
// an easy method of determining if the view should be compiled using
|
||||
// the Blade compiler or if the view is plain PHP.
|
||||
foreach (array(EXT, BLADE_EXT) as $extension)
|
||||
{
|
||||
if (file_exists($path = VIEW_PATH.$view.$extension))
|
||||
{
|
||||
return $path;
|
||||
}
|
||||
elseif (file_exists($path = SYS_VIEW_PATH.$view.$extension))
|
||||
{
|
||||
return $path;
|
||||
}
|
||||
}
|
||||
|
||||
throw new \RuntimeException("View [$view] does not exist.");
|
||||
|
|
Loading…
Reference in New Issue