apollopy/laravel-x-eloquent
最新稳定版本:2.0.0
Composer 安装命令:
composer require apollopy/laravel-x-eloquent
包简介
Enhanced Eloquent for Laravel
关键字:
README 文档
README
Installation
composer require apollopy/laravel-x-eloquent
After updating composer, add the service provider to the providers array in config/app.php
ApolloPY\Eloquent\EloquentServiceProvider::class,
Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
Extension
sortByIds
$ids = [3, 1, 2]; $posts = Post::find($ids); // collection -> [1, 2, 3] $posts = $posts->sortByIds($ids); // collection -> [2 => 3, 0 => 1, 1 => 2] $posts = $posts->values(); // collection -> [3, 1, 2]
chunkByTime
Topic::where('user_id', 1)->chunkByTime(3600, function ($topics) { // });
统计信息
- 总下载量: 15.73k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-02-18