承接 andreykurmel/eloquent_as_doctrine 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-08-26