Skip to content

Instantly share code, notes, and snippets.

@EleazarRC
Created January 8, 2022 10:03
Show Gist options
  • Save EleazarRC/5116a8524464ea4d11da96454a42cf5f to your computer and use it in GitHub Desktop.
Save EleazarRC/5116a8524464ea4d11da96454a42cf5f to your computer and use it in GitHub Desktop.
PHP MVC: index.php
<?php
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../includes/app.php';
use MVC\Router;
use Controllers\LoginController;
$router = new Router();
// LOGIN
$router->get('', [LoginController::class, 'login']);
$router->post('', [LoginController::class, 'login']);
// Comprueba y valida las rutas, que existan y les asigna las funciones del Controlador
$router->comprobarRutas();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment