add chat as own route
This commit is contained in:
@@ -15,9 +15,8 @@ use Symfony\Component\Routing\Attribute\Route;
|
||||
|
||||
final class DashboardController extends AbstractController
|
||||
{
|
||||
#[Route('', name: 'admin_dashboard_null')]
|
||||
#[Route('/', name: 'admin_dashboard_trail')]
|
||||
#[Route('/admin', name: 'admin_dashboard_alias')]
|
||||
#[Route('/admin/', name: 'admin_dashboard_trail')]
|
||||
public function redirectToDashboard(): RedirectResponse
|
||||
{
|
||||
return $this->redirectToRoute('admin_dashboard');
|
||||
|
||||
26
src/Controller/Chat/ChatController.php
Normal file
26
src/Controller/Chat/ChatController.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Controller\Chat;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
|
||||
/**
|
||||
* Public chat frontend entrypoint.
|
||||
*
|
||||
* This controller intentionally lives outside App\Controller\Admin so the chat
|
||||
* UI can evolve independently from the administration area and can receive its
|
||||
* own access rules later without coupling it to admin navigation or templates.
|
||||
*/
|
||||
final class ChatController extends AbstractController
|
||||
{
|
||||
#[Route('/', name: 'chat_index', methods: ['GET'])]
|
||||
#[Route('/chat', name: 'chat_index_alias', methods: ['GET'])]
|
||||
public function index(): Response
|
||||
{
|
||||
return $this->render('chat/index.html.twig');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user