<?php
namespace App\Controller\Admin;
use App\Entity\City;
use App\Entity\Province;
use App\Entity\User;
use App\Form\AddToListMultipleType;
use Doctrine\ORM\EntityManagerInterface;
use Knp\Component\Pager\PaginatorInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Routing\Annotation\Route;
use function PHPUnit\Framework\throwException;
/**
* @Route("/admin", name="admin_")
*/
class DashboardController extends AbstractController
{
protected EntityManagerInterface $em;
protected PaginatorInterface $paginator;
protected $itemsOptions = [10, 20, 30];
public function __construct(EntityManagerInterface $entityManager, PaginatorInterface $paginator)
{
$this->em = $entityManager;
$this->paginator = $paginator;
}
/**
* @Route("/", name="admin")
*/
public function admin(Request $request) :Response
{
return $this->redirectToRoute('admin_users_list');
}
}