WIP: Implement Admin CRUD
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user