domain-watchdog/src/Controller/MeController.php

23 lines
449 B
PHP
Raw Normal View History

2024-07-18 12:36:01 +02:00
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\Security\Core\User\UserInterface;
class MeController extends AbstractController
{
public function __construct(
private readonly Security $security
)
{
}
public function __invoke(): UserInterface
{
return $this->security->getUser();
}
}