阅读(1098)
赞(26)
Laravel 8 count() {#collection-method}
2021-07-01 14:28:53 更新
count 方法返回集合内元素的总数量:
$collection = collect([1, 2, 3, 4]);
$collection->count();
// 4 count 方法返回集合内元素的总数量:
$collection = collect([1, 2, 3, 4]);
$collection->count();
// 4