[CONTROLLER][ROUTES] Refactor the base Controller to not reinvent the wheel too much and rely on Symfony's events

This commit is contained in:
Hugo Sales
2020-07-23 17:55:06 +00:00
committed by Hugo Sales
parent a1c90f2e15
commit cac00dd6d4
4 changed files with 60 additions and 19 deletions

View File

@@ -3,12 +3,11 @@
namespace App\Controller;
use App\Core\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
class Security extends Controller
{
public function login(AuthenticationUtils $authenticationUtils): Response
public function login(AuthenticationUtils $authenticationUtils)
{
if ($this->getUser()) {
return $this->redirectToRoute('main_all');