<?php
namespace App\Controller;
use App\Security\RoleManager;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class DefaultController extends AbstractController
{
/**
* @Route("/", name="home")
*/
public function index()
{
$this->denyAccessUnlessGranted("IS_AUTHENTICATED_FULLY");
return $this->redirectToRoute("admin_home");
}
/**
* @Route("/admin/dashboard", name="admin_home")
*/
public function indexAdmin()
{
$this->denyAccessUnlessGranted("IS_AUTHENTICATED_FULLY");
return $this->render('admin/home.html.twig', [
'controller_name' => '',
]);
}
}