panakour/laravel-eloquent-relationships
最新稳定版本:v0.0.1
Composer 安装命令:
composer require panakour/laravel-eloquent-relationships
包简介
programmatically get the laravel eloquent relationships.
README 文档
README
This will let you programmatically get the relations of models in laravel to use them how you want.
Examples
use EloquentRelationships\RelationMethods; use EloquentRelationships\Relations; $relations = new Relations(new YourModel()); //get all relations $collection = $relations->all(); //or get relations by method //belongsToMany $collection = $relations->getByMethod(RelationMethods::BelongsToMany->value); //MorphedByMany $collection = $relations->getByMethod(RelationMethods::MorphedByMany->value);
统计信息
- 总下载量: 12.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-10-28