WIP: Implement Admin CRUD

This commit is contained in:
Björn Fromme
2023-09-21 17:51:16 +02:00
parent 2dd8a6de19
commit c3c2e1ae2d
26 changed files with 568 additions and 20 deletions
@@ -0,0 +1,26 @@
<?php
namespace App\Controller\Admin\System\Fee;
use App\Repository\FeeRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class IndexController extends AbstractController
{
public function __construct(private readonly FeeRepository $feeRepository)
{}
#[Route('/admin/system/fee', name: 'app_admin_system_fee_index')]
#[IsGranted('ROLE_ADMIN')]
public function index(): Response
{
$fees = $this->feeRepository->findBy([], ['name' => 'ASC']);
return $this->render('admin/system/fee/index.html.twig', [
'fees' => $fees,
]);
}
}