From 5859729b6368d99bb67234446d242654eb8e050c Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Thu, 8 May 2014 22:25:14 +1200 Subject: [PATCH 1/2] added default 404 --- app/lang/en/home.php | 3 ++- app/start/global.php | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/lang/en/home.php b/app/lang/en/home.php index 8003c49..85d9dc8 100644 --- a/app/lang/en/home.php +++ b/app/lang/en/home.php @@ -44,6 +44,7 @@

Laravel Tricks website was created by Stidges and Maks Surguy in November 2013

Want the source?

- The source of this website is available on Github.' + The source of this website is available on Github.', + 'default_404' => 'This is embarrasing! We can\'t find the page you are looking for. Please try the search box above' ); diff --git a/app/start/global.php b/app/start/global.php index e4463f0..b732a29 100644 --- a/app/start/global.php +++ b/app/start/global.php @@ -36,6 +36,14 @@ return Response::view('home.error', compact('error'), 404); }); +App::missing(function() +{ + $error = trans('home.default_404'); + + return Response::view('home.error', compact('error') , 404); +}); + + /* |-------------------------------------------------------------------------- | Maintenance Mode Handler From be74d30cc7a6848470fcd0e9e670d1b5463e492f Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Thu, 8 May 2014 22:26:02 +1200 Subject: [PATCH 2/2] Fixed indentation --- app/start/global.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/start/global.php b/app/start/global.php index b732a29..df3feaf 100644 --- a/app/start/global.php +++ b/app/start/global.php @@ -40,7 +40,7 @@ { $error = trans('home.default_404'); - return Response::view('home.error', compact('error') , 404); + return Response::view('home.error', compact('error') , 404); });