Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

use App\Controller\CursoController;
use App\Controller\HomeController;
use App\Controller\LoginController;
use App\Controller\ErrorController;
use App\Controller\TranslateController;
use App\Controller\AlunoController;

return [
// url a ser acessada => [Controller, metodo]
'/' => [HomeController::class, 'index'],
'/login' => [LoginController::class, 'index'],


'/erro-404' => [ErrorController::class, 'notFound'],
Expand Down
13 changes: 13 additions & 0 deletions src/Controller/LoginController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace App\Controller;

final class LoginController extends AbstractController
{
public function index(): void
{
parent::render('login/index');
}
}
24 changes: 24 additions & 0 deletions views/login/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div class="container">
<div class="row justify-content-center">
<div class="col-md-6">
<div class="card mt-5">
<div class="card-header">
Cadastro
</div>
<div class="card-body">
<form>
<div class="mb-3">
<label for="email" class="form-label">E-mail</label>
<input type="email" class="form-control" id="email" name="email" required>
</div>
<div class="mb-3">
<label for="senha" class="form-label">Senha</label>
<input type="password" class="form-control" id="senha" name="senha" required>
</div>
<button type="submit" class="btn btn-primary">Cadastrar</button>
</form>
</div>
</div>
</div>
</div>
</div>