1
0
Fork 0
This repository has been archived on 2025-03-05. You can view files and clone it, but cannot push or open issues or pull requests.
TheBadSpace/src/Controller/Routes/Front/Index.php
Ro 54b5227a0d Auth Framework, Part 1
Started buildig the authorization infrastructure to 1. create the
initial admin class to then 2. the Auth manager class can be created to
manage access based on roles.

added number of template files as well just as a UI base to get things
started.

Auth Framework Part 2 will complete the Auth mangager and clean up the
admin area.
2022-12-12 17:42:40 -08:00

54 lines
1.6 KiB
PHP

<?php
// src/Controller/DataImport.php
// Grab data from transfer app
namespace App\Controller\Routes\Front;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
//use App\Utils\PageRender;
//use App\Data\Auth;
class Index extends AbstractController
{
/**
* @Route("/", name="index")
*/
public function showIndex(Request $request): Response
{
return $this->render("front/index.twig", [
"title" => "This is The Bad Space",
]);
/*
$result = $auth->status();
if ($result["status"]) {
return $render->renderPage(
[
"bgImage" => "/images/base/tweed-flowers.png",
"role" => $result["role"],
],
"The Nile List | Welcome Back",
"front/index.html.twig"
);
} else {
//back to index to login
header("Location:/login");
return new Response("<html><body>LOGGED IN</body></html>");
}
*/
}
/**
* @Route("/knockknock", name="access")
*/
public function access(Request $request): Response
{
return $this->render("front/knock.twig", [
"title" => "Wipe Your feet",
]);
}
}