Support the ongoing development of Laravel.io →
posted 9 years ago
Requests
Last updated 2 years ago.
0
Solution
App::missing(function() {
    return View::make('404');
});

Note that whilst debug is enabled the 404 page will not be shown as the exception is handled by the debugger.

Last updated 2 years ago.
0

Thank you. I found it:

Route::get('{test}', function($test) { // check your DB for $test, get the page, etc... })->where('test', '^.*');

Which is better?

Last updated 2 years ago.
0

Using the App::missing() would be better as that way you're getting access to the proper NotFoundHttpException

Last updated 2 years ago.
0

Thank you iWader.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

kuzroman kuzroman Joined 6 Nov 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.