willy.club/routes/start.php

15 lines
390 B
PHP
Raw Normal View History

2022-11-29 12:49:29 +00:00
<?php
use WillySoft\Http\ErrorHandler;
use WillySoft\Http\Route;
ErrorHandler::register(function($error_messages) {
view('errors/500', ['error_messages' => $error_messages]);
});
Route::get('/', fn() => view('pages/home'));
2022-12-13 16:59:47 +00:00
Route::get('/matrix', fn() => view('pages/matrix'));
2022-11-29 12:49:29 +00:00
// since no route was matched we show a page not found error
http_response_code(404);
view('errors/404');