This commit is contained in:
jhx
2022-08-23 13:51:25 +08:00
parent 8efbdbce8c
commit 71c3760c7c
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -9,6 +9,13 @@ use support\Request;
class Index class Index
{ {
public function test()
{
echo 'test';
}
public function index(Request $request, $checkIp = null) public function index(Request $request, $checkIp = null)
{ {
$ip = $request->getRealIp(); $ip = $request->getRealIp();
+1
View File
@@ -15,6 +15,7 @@
use Webman\Route; use Webman\Route;
Route::any('/', [\app\controller\Index::class, 'index']); Route::any('/', [\app\controller\Index::class, 'index']);
Route::any('/test', [\app\controller\Index::class, 'test']);
Route::any('/check[/{ip}]', [\app\controller\Index::class, 'index']); Route::any('/check[/{ip}]', [\app\controller\Index::class, 'index']);