<?php
namespace App\Controller\Admin;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use App\Repository\BatchRepository;
/**
*
* @author "wendell.zheng <wxzheng@ustc.edu.cn>"
*/
class DefaultController extends AbstractController
{
/**
*
* @Route("/admin", name="admin")
*/
public function index(BatchRepository $br): Response
{
$batches = $br->list();
return $this->render('admin/index.html.twig', [
'title' => '批次',
'entities' => $batches
]);
}
}