Flugg\Responder\Http\ResponseBuilder::respond PHP Метод

respond() публичный Метод

Serialize the data and wrap it in a JSON response object.
public respond ( integer $statusCode = null, array $headers = [] ) : Illuminate\Http\JsonResponse
$statusCode integer
$headers array
Результат Illuminate\Http\JsonResponse
    public function respond(int $statusCode = null, array $headers = []) : JsonResponse
    {
        if (!is_null($statusCode)) {
            $this->setStatus($statusCode);
        }
        $data = $this->includeStatusCode($this->toArray());
        return $this->responseFactory->json($data, $this->statusCode, $headers);
    }