src/Controller/ContactusController.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Images;
  4. use Doctrine\Persistence\ManagerRegistry;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use telesign\sdk\messaging\MessagingClient;
  8. use Symfony\Component\Routing\Annotation\Route;
  9. class ContactusController extends AbstractController
  10. {
  11.     /**
  12.      * @Route("/contacto", name="app_contactus")
  13.      */
  14.     public function index(ManagerRegistry $doctrine): Response
  15.     {
  16. //        $customer_id = "135BBB56-B8CC-404C-8FE1-09219DC133FC";
  17. //        $api_key = "LJmzI3AhkNQXsVryn4Xrk2WRhIi2NzTaJWM3YNxx3PpKDewhMladeGj6Yw82Ti/R7j+4h7wMUa1pGfkbC1FADQ==";
  18. //        $phone_number = "351964858280";
  19. //        $message = "Olá Fábio, isso é um teste de sms que vem do servidor, neste momento é com nr a mostra, depois fica com nome comercial.. Yurii";
  20. //        $message_type = "ARN";
  21. //        $messaging = new MessagingClient($customer_id, $api_key);
  22. //        $response = $messaging->message($phone_number, $message, $message_type);
  23. //
  24. //        dd($response);
  25.         $banner = $doctrine->getRepository(Images::class)->findOneBy(['type' => 'banner2']);
  26.         return $this->render('contactus/index.html.twig', [
  27.             'titlePage' => 'Contactos',
  28.             'banner' => $banner,
  29.         ]);
  30.     }
  31. }