<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use App\Entity\Config;
class DefaultController extends AbstractController
{
/**
* @Route("/{vueRouting}", name="index", defaults={"vueRouting": null})
* @Route("/organisation/{vueRouting}", name="organisation", defaults={"vueRouting": null})
* @Route("/organisations/{vueRouting}", name="organisation")
* @Route("/user/{vueRouting}", name="user", defaults={"vueRouting": null})
* @Route("/users/{vueRouting}", name="user")
* @Route("/product/{vueRouting}", name="product")
* @Route("/boxes/{vueRouting}", name="product")
* @Route("/servers/{vueRouting}", name="server")
* @return Response
*/
public function indexAction(): Response {
$config = $this->getDoctrine()->getRepository(Config::class)->find(1);
if(!$config){
$config = new Config();
}
return $this->render('base.html.twig', [
'company' => !$config->getCompany() ? $this->getParameter('company') : $config->getCompany()
]);
}
}