Answer the question
In order to leave comments, you need to log in
Where is it better to place JsonResponse in a service or in a controller and why?
public function change(Request $request): JsonResponse
{
$result = $this->localeService->setLocale($request);
return new JsonResponse($result, $result['status']);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question