ajustando rotas

This commit is contained in:
Reginaldo
2023-06-12 12:19:16 -03:00
parent bc6d88534a
commit 20fc580fe2
7 changed files with 67 additions and 17 deletions

19
config/rotas.php Normal file
View File

@@ -0,0 +1,19 @@
<?php
function load(string $controller,string $action){
//se o controller existe
$controllerNamespace = "app\\controllers\\{$controller}";
var_dump($controller);
}
$rotas = [
"GET" =>[
"/"=> load("HomeController","index"),
"/login" => load("LoginController","index")
],
"POST"=>[
"contato" => load("ContatoController","store")
]
];