20240413#7
This commit is contained in:
13
application/config/routes/main/09-main.yaml
Normal file
13
application/config/routes/main/09-main.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
# Index
|
||||
- key: "/"
|
||||
routes:
|
||||
- action: "App\\Main\\Controllers\\IndexController"
|
||||
method: "index"
|
||||
params: ""
|
||||
|
||||
# Empty
|
||||
- key: "<@any>"
|
||||
routes:
|
||||
- action: "App\\Main\\Controllers\\IndexController"
|
||||
method: "emptyAction"
|
||||
params: ""
|
||||
9
application/config/routes/main/routes.php
Normal file
9
application/config/routes/main/routes.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
$routes = glob(__DIR__."/{*.yaml}", GLOB_BRACE);
|
||||
|
||||
$routesCollection = array_map(function ($routesFile){
|
||||
return file_get_contents($routesFile).PHP_EOL;
|
||||
}, $routes);
|
||||
|
||||
return yaml_parse(implode($routesCollection));
|
||||
Reference in New Issue
Block a user