<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\JsonResponse;
class DashboardController extends AbstractController
{
/**
* @Route("/", name="index")
*/
public function index(): Response
{
//return new JsonResponse(array('message' => '/register or /login! or if logged in, /dashboard'));
return $this->render('index/index.html.twig', [
'controller_name' => 'indexController',
]);
}
/**
* @Route("/dashboard", name="dashboard")
*/
public function dashboard(): Response
{
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
return $this->render('dashboard/index.html.twig', [
'controller_name' => 'DashboardController',
]);
}
}