-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from math280h/feature/routing-groups
Implemented route grouping, cleaned up public asset handling
- Loading branch information
Showing
7 changed files
with
181 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
require '../../vendor/autoload.php'; | ||
|
||
use Math280h\PhpRouter\Route; | ||
use Math280h\PhpRouter\Router; | ||
|
||
session_start(); | ||
|
||
$router = new Router(); | ||
$router->get('/', function () { | ||
echo 'Hello World'; | ||
}); | ||
|
||
$router->get('/yeet', function () { | ||
echo 'Hello World'; | ||
}); | ||
|
||
|
||
$router->group(["prefix" => "test"], [ | ||
Route::get('/1', function () { | ||
echo 'Hello World'; | ||
}), | ||
Route::get('/2', function () { | ||
echo 'Hello World'; | ||
}), | ||
]); | ||
|
||
$router->addMiddleware("log", function ($request) { | ||
print_r($request); | ||
}); | ||
|
||
$router->run(); |
This file was deleted.
Oops, something went wrong.