daikazu/laravel-recursive-collection
最新稳定版本:v1.0.11
Composer 安装命令:
composer require daikazu/laravel-recursive-collection
包简介
Convert nested arrays, associative, and multidimensional arrays into nested collections.
README 文档
README
Convert nested arrays, associative, and multidimensional arrays into nested collections.
Install
Install using composer.
composer require daikazu/laravel-recursive-collection
Setup
NOTE This package supports Laravel 5.5 auto-discovery, so you can skip the setup if you are using 5.5 and above.
And add the service provider in config/app.php:
Daikazu\Laravel\RecursiveCollectionServiceProvider::class,
Usage
$data = [ "foo" => "bar", "a" => [1, 2, 3], "b" => [ [1, 2, 3], [ "4" => "", "5" => "", "3" => "", ], ], ]; $collection = (new Collection($data))->recursive(); $collection = collect($data)->recursive();
统计信息
- 总下载量: 25.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-06-20