Autarky\Routing\ControllerTrait::json PHP Method

json() protected method

Create a JSON response.
protected json ( array $data, integer $statusCode = 200 ) : Symfony\Component\HttpFoundation\JsonResponse
$data array
$statusCode integer
return Symfony\Component\HttpFoundation\JsonResponse
    protected function json(array $data, $statusCode = 200)
    {
        return new JsonResponse($data, $statusCode);
    }