diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57872d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/vendor/ diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php new file mode 100644 index 0000000..ffe55a9 --- /dev/null +++ b/app/controllers/HomeController.php @@ -0,0 +1,6 @@ +[ + "/"=> load("HomeController","index"), + "/login" => load("LoginController","index") + ], + "POST"=>[ + "contato" => load("ContatoController","store") + ] +]; diff --git a/index.php b/index.php index 72865fa..575a7bf 100644 --- a/index.php +++ b/index.php @@ -1,18 +1,19 @@ getAlunos(); @@ -20,15 +21,18 @@ require_once('classes/login.class.php'); //echo json_encode($Alunos); //criada a instancia da classe login com um id 61 fixo -$Log = new Login; -$Logins = $Log->getLogin($NO_USERNAME); +//$Log = new Login; +//$Logins = $Log->getLogin($NO_USERNAME); // feito um print exibindo apenas o campo NO_USERNAME -echo json_encode($Logins); +//echo json_encode($Logins); -exit; +//exit; //url para retonar o login 61 //http://localhost/projeto/api_educa/index.php/?idf=61 //http://localhost/projeto/api_educa/index.php/?idf=66 -//http://192.168.18.2/projeto/api_educa/index.php/?NO_USERNAME=AMENEZES \ No newline at end of file +//http://192.168.18.2/projeto/api_educa/index.php/?NO_USERNAME=AMENEZES + +//aprendendo rotas +//https://www.youtube.com/watch?v=h7K-KUZ3Rvw \ No newline at end of file