chore: moves common code to Base namespace

This commit is contained in:
2025-07-06 22:53:13 -05:00
parent a0050e425b
commit 1fc5a8e500
28 changed files with 30 additions and 57 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace App\Base\Framework\Controller;
use App\Base\Util\Broadcaster;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
final class AlertController extends AbstractController
{
public function __construct(
private readonly Broadcaster $broadcaster,
) {}
#[Route('/alert', name: 'app_alert')]
public function index(): Response
{
$this->broadcaster->alert(
'Added to queue',
'This is a testy test!'
);
return $this->json([
'Success' => 'Published'
]);
}
}