src/Controller/MainController.php line 28
<?phpnamespace App\Controller;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\RedirectResponse;use Symfony\Component\Routing\Annotation\Route;class MainController extends AbstractController{/*** The front door.** This used to be a leftover from an unrelated car-service project: it* queried App\Entity\AutoService, About, Banner and Car — none of which* exist here — and passed undefined $work/$step variables into a template* that has since become the map. Every request to "/" answered with a* 500, which also broke signing in, because the login form redirects to* page_home on success.** The map is the product, so the home page now simply goes there. Replace* this with a real landing page when there is one to show.** Drivers, though, have their own app — they sign in to work, not to browse* — so a ROLE_DRIVER user is sent straight there.*/#[Route('/{_locale}', name: 'page_home', requirements: ['_locale' => 'ru|hy'], defaults: ['_locale' => 'hy'])]public function index(): RedirectResponse{if ($this->isGranted('ROLE_DRIVER')) {return $this->redirectToRoute('driver_app');}return $this->redirectToRoute('app_map');}}