moved error pages to application directory.
This commit is contained in:
@@ -20,7 +20,6 @@ define('MODEL_PATH', APP_PATH.'models/');
|
||||
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 @@ class 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.");
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Error 404 - Not Found</title>
|
||||
|
||||
<style>
|
||||
<?php echo file_get_contents(PUBLIC_PATH.'css/laravel.css'); ?>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<img src="http://laravel.com/img/splash/error.png" class="marker">
|
||||
|
||||
<?php $messages = array('We need a map.', 'I think we\'re lost.', 'We took a wrong turn.'); ?>
|
||||
|
||||
<h1><?php echo $messages[mt_rand(0, 2)]; ?></h1>
|
||||
|
||||
<h2>Server Error: 404 (Not Found)</h2>
|
||||
|
||||
<h3>What does this mean?</h3>
|
||||
|
||||
<p>
|
||||
We couldn't find the page you requested on our servers. We're really sorry
|
||||
about that. It's our fault, not yours. We'll work hard to get this page
|
||||
back online as soon as possible.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Perhaps you would like to go to our <?php echo HTML::link('/', 'home page'); ?>?
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,35 +0,0 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Error 500 - Internal Server Error</title>
|
||||
|
||||
<style>
|
||||
<?php echo file_get_contents(PUBLIC_PATH.'css/laravel.css'); ?>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main">
|
||||
<img src="http://laravel.com/img/splash/error.png" class="marker">
|
||||
|
||||
<?php $messages = array('Ouch.', 'Oh no!', 'Whoops!'); ?>
|
||||
|
||||
<h1><?php echo $messages[mt_rand(0, 2)]; ?></h1>
|
||||
|
||||
<h2>Server Error: 500 (Internal Server Error)</h2>
|
||||
|
||||
<h3>What does this mean?</h3>
|
||||
|
||||
<p>
|
||||
Something went wrong on our servers while we were processing your request.
|
||||
We're really sorry about this, and will work hard to get this resolved as
|
||||
soon as possible.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Perhaps you would like to go to our <?php echo HTML::link('/', 'home page'); ?>?
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user