Display big category tree on route /category/ without parameter #57
@@ -8,7 +8,7 @@ use Symfony\Component\Routing\Attribute\Route;
|
|||||||
|
|
||||||
final class CategoryController extends BaseController
|
final class CategoryController extends BaseController
|
||||||
{
|
{
|
||||||
#[Route('/category/{category?}', name: 'app_category', defaults: ["category" => null])]
|
#[Route('/category/{category?}', name: 'app_category')]
|
||||||
public function __invoke(?string $category): Response
|
public function __invoke(?string $category): Response
|
||||||
{
|
{
|
||||||
if($this->cache->getItem('list_category_'.$category)->isHit()) {
|
if($this->cache->getItem('list_category_'.$category)->isHit()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user