andreykurmel/eloquent_as_doctrine
最新稳定版本:0.1
Composer 安装命令:
composer require andreykurmel/eloquent_as_doctrine
包简介
Hydrate Laravel Entities from Models to use all Eloquent benefits in Service/Repository pattern.
关键字:
README 文档
README
Hydrate Laravel Entities from Models to use all Eloquent benefits in Service/Repository pattern.
Laravel Eloquent Model changed to return Entities which can be used as Data Transfer Objects.
Just use "\AndreyKurmel\EloquentAsDoctrine\Models\Model" instead of "\Illuminate\Database\Eloquent\Model".
Class to be used as entity can be set as property:
- protected $entity = Entity::class;
By default will be used Entity the same as Laravel Model (without database functions). But you can use any other class by implementing interface "\AndreyKurmel\EloquentAsDoctrine\Entities\EloquentInterface"
You can check an example in the folder "src/Example/" (without extra code with interfaces, entry point is "src/Example/Service.php").
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2022-08-26