<?php

/**psr-4 */
require_once "vendor/autoload.php";

/*coneccion */
use App\Libreria\Conexion; new Conexion();
use App\Models\Solicitante;
use App\Models\File;

require_once('session.php');


$solicitante = Solicitante::find($_GET['solicitante']);
$solicitante->delete();

/*$files = File::where('solicitante_id',$solicitante->id)->get();
foreach ($files as $file) {
    unlink("public/docs/" . $file->url);
}*/

$loader = new \Twig\Loader\FilesystemLoader('public/views');
$twig = new \Twig\Environment($loader, [
    'debug' => true,
    'cache' => false,
]);


header("Location: " . $_SERVER["HTTP_REFERER"]);