Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions user_guide_src/source/incoming/routing/069.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
// Would execute the show404 method of the App\Errors class
$routes->set404Override('App\Errors::show404');

// Will display a custom view
// Will display a custom view.
$routes->set404Override(static function () {
echo view('my_errors/not_found.html');
// If you want to get the URI segments.
$segments = request()->getUri()->getSegments();

return view('my_errors/not_found.html');
});