nch7/laravel-repository-gateway-maker
Composer 安装命令:
composer require nch7/laravel-repository-gateway-maker
包简介
README 文档
README
Repositories and Gateways are cool, but we are sometimes too lazy to set them up.
This package solves the problem, it handles automatic initialization and creating new Repositories & Gateways for you!
#Instructions Install with composer
"nch7/laravel-repository-gateway-maker" : "dev-master"
Add package service provider to app.php
Nch7\LaravelRepositoryGatewayMaker\LaravelRepositoryGatewayMakerServiceProvider
Add psr-4 autoloading
"psr-4" : {
"acme\\": "app/acme/"
}
Initialize
php artisan repogate:init
Add repository service provider to app.php
acme\Repositories\RepositoryServiceProvider
Create Gateway and Repository for specific model
php artisan repogate:make User
#Examples
<?php use acme\Gateways\UserGateway; class UsersController extends BaseController { public function __construct(UserGateway $users) { $this->users = $users; } public function index() { return $this->users->all(); } }
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2015-07-21