Controller/MailController.php
public function logger(Request $request, PaginatorInterface $paginator)
    {
        // Get Logs
        $query = $this->getDoctrine()
            ->getRepository($this->getParameter('pd_mailer.mail_log_class'))
            ->createQueryBuilder('m')
            ->orderBy('m.id', 'DESC')
            ->getQuery();

        // Get Result
        $mailLog = $paginator->paginate(
            $query,
            $request->query->getInt('page', 1),
            $request->query->getInt('limit', $this->getParameter('pd_mailer.list_count'))
        );

        // Render Page
        return $this->render('@PdMailer/logger.html.twig', [
            'maillogs' => $mailLog,
            'base_template' => $this->getParameter('pd_mailer.base_template')
        ]);
    }
public function logger(Request $request, PaginatorInterface $paginator)
    {
        // Get Logs
        $query = $this->getDoctrine()
            ->getRepository($this->getParameter('pd_mailer.mail_log_class'))
            ->createQueryBuilder('m')
            ->orderBy('m.id', 'DESC')
            ->getQuery();

        // Get Result
        $mailLog = $paginator->paginate(
            $query,
            $request->query->getInt('page', 1),
            $request->query->getInt('limit', $this->getParameter('pd_mailer.list_count'))
        );

        // Render Page
        return $this->render('@PdMailer/logger.html.twig', [
            'maillogs' => $mailLog,
            'base_template' => $this->getParameter('pd_mailer.base_template')
        ]);
    }
public function logger ( Request $ request , PaginatorInterface $ paginator ) { // Get Logs $ query = $ this -> getDoctrine ( ) -> getRepository ( $ this -> getParameter ( 'pd_mailer.mail_log_class' ) ) -> createQueryBuilder ( 'm' ) -> orderBy ( 'm.id' , 'DESC' ) -> getQuery ( ) ; // Get Result $ mailLog = $ paginator -> paginate ( $ query , $ request -> query -> getInt ( 'page' , 1 ) , $ request -> query -> getInt ( 'limit' , $ this -> getParameter ( 'pd_mailer.list_count' ) ) ) ; // Render Page return $ this -> render ( '@PdMailer/logger.html.twig' , [ 'maillogs' => $ mailLog , 'base_template' => $ this -> getParameter ( 'pd_mailer.base_template' ) ] ) ; }
View Mail Logs.

@param Request $request

@IsGranted("ROLE_MAIL_LOGGER")

@return \Symfony\Component\HttpFoundation\Response
View Mail Logs .