Im trying to set up a 404 page for my laravel website; for what I've been reading I should add
App::missing(function($exception)
{
return Response::view('error.missing', array(), 404);
});
to the app/start/global.php file. But the problem is as soon as I add this to the file and I go to a route that doesn't excist I get the following message: Error in exception handler.
I did add a map error in my views and created a view missing.blade.php in there!
I've been trying a lot of stuff but can't solve the problrem till now.
Atm I'm running the project on WAMP.
Hope somebody can help me out with this! :)
What my laravel logs:
> [2014-12-22 15:10:54] production.ERROR: exception
> 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in
> C:\Users\Sam\Dropbox\Web Projects\Petere\bootstrap\compiled.php:5687
> Stack trace:
> #0 C:\Users\Sam\Dropbox\Web Projects\Petere\bootstrap\compiled.php(5004):
> Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request))
> #1 C:\Users\Sam\Dropbox\Web Projects\Petere\bootstrap\compiled.php(4992):
> Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))
> #2 C:\Users\Sam\Dropbox\Web Projects\Petere\bootstrap\compiled.php(4984):
> Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))
> #3 C:\Users\Sam\Dropbox\Web Projects\Petere\bootstrap\compiled.php(717):
> Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))
> #4 C:\Users\Sam\Dropbox\Web Projects\Petere\bootstrap\compiled.php(698):
> Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))
> #5 C:\Users\Sam\Dropbox\Web Projects\Petere\bootstrap\compiled.php(7706):
> Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request),
> 1, true)
> #6 C:\Users\Sam\Dropbox\Web Projects\Petere\bootstrap\compiled.php(8309):
> Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request),
> 1, true)
> #7 C:\Users\Sam\Dropbox\Web Projects\Petere\bootstrap\compiled.php(8256):
> Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1,
> true)
> #8 C:\Users\Sam\Dropbox\Web Projects\Petere\bootstrap\compiled.php(10895):
> Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1,
> true)
> #9 C:\Users\Sam\Dropbox\Web Projects\Petere\bootstrap\compiled.php(659):
> Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
> #10 C:\Users\Sam\Dropbox\Web Projects\Petere\public\index.php(49): Illuminate\Foundation\Application->run()
> #11 {main} [] []
Just add 404.blade.php
in your views resources/views/error/404.blade.php
it will work like what I did.