JsonResponse

Illuminate\Http\JsonResponse

class src/Illuminate/Http/JsonResponse.php

__construct

v11.0.0 以前から

__construct($data = null, $status = 200, $headers = [], $options = 0, $json = false)
@param mixed $data
@param int $status
@param array $headers
@param int $options
@param bool $json
  1. v11.0.0 追加
    変更後
    __construct($data = null, $status = 200, $headers = [], $options = 0, $json = false) [@param mixed $data, @param int $status, @param array $headers, @param int $options, @param bool $json, @return void]
  2. v12.4.0 シグネチャ変更
    変更前
    __construct($data = null, $status = 200, $headers = [], $options = 0, $json = false) [@param mixed $data, @param int $status, @param array $headers, @param int $options, @param bool $json, @return void]
    変更後
    __construct($data = null, $status = 200, $headers = [], $options = 0, $json = false) [@param mixed $data, @param int $status, @param array $headers, @param int $options, @param bool $json]

fromJsonString

v11.0.0 以前から

static

static fromJsonString(?string $data = null, int $status = 200, array $headers = []): static
@return static
  1. v11.0.0 追加
    変更後
    static fromJsonString(?string $data = null, int $status = 200, array $headers = []): static [@return static]

getData

v11.0.0 以前から

getData($assoc = false, $depth = 512)
@param bool $assoc
@param int $depth
@return mixed
  1. v11.0.0 追加
    変更後
    getData($assoc = false, $depth = 512) [@param bool $assoc, @param int $depth, @return mixed]

hasEncodingOption

v11.0.0 以前から

hasEncodingOption($option)
@param int $option
@return bool
  1. v11.0.0 追加
    変更後
    hasEncodingOption($option) [@param int $option, @return bool]

setData

v11.0.0 以前から

setData($data = []): static
@return static
  1. v11.0.0 追加
    変更後
    setData($data = []): static [@return static]

setEncodingOptions

v11.0.0 以前から

setEncodingOptions($options): static
@return static
  1. v11.0.0 追加
    変更後
    setEncodingOptions($options): static [@return static]

withCallback

v11.0.0 以前から

withCallback($callback = null)
@param string|null $callback
@return $this
  1. v11.0.0 追加
    変更後
    withCallback($callback = null) [@param string|null $callback, @return $this]