/**
* Determine(判断) if the given content should be turned into JSON.
*
* @param mixed $content
* @return bool
*/
protected function shouldBeJson($content)
{
return $content instanceof Arrayable ||
$content instanceof Jsonable ||
$content instanceof ArrayObject ||
$content instanceof JsonSerializable ||
is_array($content);
}
Arrayable
Jsonable
ArrayObject
JsonSerializable
TODO
原创文章,作者:carmelaweatherly,如若转载,请注明出处:https://blog.ytso.com/191753.html