<?php
namespace App\Controller;
use App\Services\ApiService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
class OffreController extends AbstractController
{
private $apiService;
public function __construct(ApiService $apiService)
{
$this->apiService = $apiService;
}
/**
* @Route("/job-search", name="app_offre_search",methods={"GET"})
*/
public function jobBySpecialite(Request $request): Response
{
$contentRequest = $request->query->all();
$data = $this->apiService->getListOffre($contentRequest);
return $this->render('pages/job/job_specialite.html.twig', [
"data" => $data
]);
}
}