Newer
Older
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
class PrepareMenuController extends AbstractController
{
#[Route('/prepare/menu', name: 'app_prepare_menu')]
public function index(Request $request): Response
{
$array = $request->toArray();
$return = prepareMenu($array);
return new JsonResponse($return, Response::HTTP_OK);
}
}