src/Controller/LoginController.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Contracts\HttpClient\HttpClientInterface;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  7. class LoginController extends AbstractController
  8. {
  9.     private $client;
  10.     public function __construct(HttpClientInterface $client)
  11.     {
  12.         $this->client $client;
  13.     }
  14.     /**
  15.      * @Route("/login")
  16.      */
  17.     public function renderLoginPage()
  18.     {
  19.         // $response = $this->client->request(
  20.         //     'POST',
  21.         //     '{$_ENV['BASE_API']}login'
  22.         // );
  23.         // $content = $response->toArray();
  24.         // $finalArray = [];
  25.         // foreach($content["clients"]as $client)
  26.         // {
  27.         //     array_push($finalArray, $client["Ids"]);
  28.         // }
  29.         return $this->render('./login/login.html.twig', array(
  30.         ));
  31.     }
  32.     /**
  33.      * @Route("/forgot/{token}")
  34.      */
  35.     public function renderModificationPassword(string $token)
  36.     { 
  37.         
  38.         return $this->render('./login/login.html.twig', array(
  39.                 'token' => $token,
  40.             )
  41.         );
  42.     }
  43. }
  44. ?>