diff --git a/app/lang/en/cachet.php b/app/lang/en/cachet.php index 56e676d0..61f06fcd 100644 --- a/app/lang/en/cachet.php +++ b/app/lang/en/cachet.php @@ -55,6 +55,9 @@ return [ 'logged_incidents' => '{0} There are no incidents, good work.|You have logged one incident.|You have reported :count incidents.', 'settings_saved' => 'Settings saved.', 'settings_not_saved' => 'Settings could not be saved.', + 'not_found' => 'Page Not Found', + 'not_found_message' => 'Sorry, but the page you are looking for has not been found. Check the URL for errors and try again.', + 'not_found_link' => 'Return to homepage', ], // Forms 'forms' => [ diff --git a/app/start/global.php b/app/start/global.php index d4cf71ba..5cfc2b34 100644 --- a/app/start/global.php +++ b/app/start/global.php @@ -57,9 +57,13 @@ API::error(function (\Illuminate\Database\Eloquent\ModelNotFoundException $excep }); App::missing(function ($exception) { - return Response::view('errors.404', [ - 'pageTitle' => 'That page went missing!' - ], 404); + if (Request::is('dashboard*') or Request::is('api*')) { + return Response::view('errors.404', [ + 'pageTitle' => 'That page went missing!', + ], 404); + } + + return Redirect::route('status-page'); }); /* diff --git a/app/views/errors/404.blade.php b/app/views/errors/404.blade.php index b54409c9..e4df17ca 100644 --- a/app/views/errors/404.blade.php +++ b/app/views/errors/404.blade.php @@ -2,13 +2,17 @@ @section('content')
+
+ +

404

-

Page Not Found

+

{{ Lang::get('cachet.dashboard.not_found') }}

-

Sorry, but the page you are looking for has not been found. Check the URL for errors and try again.

+

{{ Lang::get('cachet.dashboard.not_found_message') }}

+

- Home + {{ Lang::get('cachet.dashboard.not_found_link') }}