Private
Public Access
1
0

chg: pkg: add some changes on BE - add eslint and editorconfig - and add some deps #4

This commit is contained in:
2026-04-09 15:01:38 +02:00
parent fa0fc0743d
commit 4cdca43ecc
8 changed files with 10604 additions and 51 deletions

View File

@@ -11,6 +11,7 @@
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\DependencyInjection\Attribute\Autowire;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -22,6 +23,12 @@ use Symfony\Component\HttpFoundation\Response;
*/
class GameController extends AbstractController
{
public function __construct(
#[Autowire(env: 'APP_ENV')]
private readonly string $env,
) {
}
/**
* It is the homepage
*
@@ -42,8 +49,8 @@ class GameController extends AbstractController
public function play(Request $request): Response
{
return $this->render('Game/play.html.twig', array(
'env' => getenv('APP_ENV'),
'ssl' => $request->isSecure() ? 'true' : 'false'
'env' => $this->env,
'ssl' => $request->isSecure() ? 'true' : 'false',
));
}