idtitanium/laravel-api-interface-gen
Composer 安装命令:
composer require idtitanium/laravel-api-interface-gen
包简介
A useful artisan command to generate an interface and its repository while building your api
README 文档
README
laravel-api-interface-gen
Provides useful artisan command to help generate repositories and interfaces.
USAGE
-
Installing To install run
composer require idtitanium/laravel-api-interface-gen. Support Laravel version 6.1 or higher. Lower versions might not work so nicely. -
Making an Interface When you run
php artisan make:interface Book. This will generate two folders (if they don't already exist). One called Repositories and inside it Interfaces. Then, theBookRepostoryInterfacewill be created inside the Interfaces folder. -
Making a Repository when you run
php artisan make:repository Book. This will generate a repository class with the NameBookRepositoryWith an assumption that you already have an interface calledBookRepositoryInterface. -
Making a Repsoitory and Interface. This is the best part of this package. when you run
php artisan make:repositoryinterface Book. This creates both the repository and the interface in their respective folders and correct namespaces. -
All command will create a
RepositoryServiceProviderfile, if it doesn't currently exist.
NOTE: This commands currently does not register the service provider in the app config. Also, it creates a service provider wihout the binding of the repository to the interface.
idtitanium/laravel-api-interface-gen 适用场景与选型建议
idtitanium/laravel-api-interface-gen 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 707 次下载、GitHub Stars 达 3, 最近一次更新时间为 2020 年 04 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 idtitanium/laravel-api-interface-gen 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 idtitanium/laravel-api-interface-gen 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 707
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-05