<?phpnamespace App\Controller;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\Routing\Annotation\Route;use Symfony\Component\HttpFoundation\Request;class HomeController extends AbstractController{ #[Route(path: '/', name: 'home')] public function home(Request $request): Response { if ($this->getUser()) { return $this->redirectToRoute('app_dashboard'); } return $this->redirectToRoute('app_login'); }}