Add profile page + disable Turbo

This commit is contained in:
2024-10-29 15:04:44 +01:00
parent 008cc7218d
commit b3585047be
4 changed files with 107 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class ProfileController extends AbstractController
{
#[Route('/profile', name: 'app_profile')]
public function index(): Response
{
return $this->render('profile/index.html.twig', [
'controller_name' => 'ProfileController',
]);
}
}

View File

@@ -37,6 +37,9 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
#[ORM\Column(length: 40, nullable: true)]
private ?string $lastname = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $email = null;
public function getId(): ?int
{
return $this->id;
@@ -103,6 +106,11 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
/**
* @see UserInterface
*/