<?phpnamespace App\Controller\Api;use App\Services\Core\Core;use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\EventDispatcher\EventDispatcherInterface;use Symfony\Component\HttpFoundation\Request;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\Routing\Annotation\Route;use Symfony\Component\HttpFoundation\JsonResponse;class DataController extends AbstractController{ public function test(Request $request) { $data = [ [ 'id' => '1', 'title' => 'Inscriptions', 'number' => 1836, ], [ 'id' =>'2', 'title' => 'Leads', 'number' => 10, ], [ 'id' => '3', 'title' => 'Factures', 'number' => 42, ], [ 'id' => '4', 'title' => 'Devis', 'number' => 0, ] ]; return new JsonResponse($data); } public function widgetmac(Request $request) { return new JsonResponse([ 'total_inscriptions' => 1200, 'total_candidates' => 1000, 'total_recruiters' => 200, 'new_candidates' => 10, 'new_recruiters' => 10, 'recruiter_verifications' => 0, ]); }}