Package Data | |
---|---|
Maintainer Username: | xezw211 |
Maintainer Contact: | xezw211@126.com (hsky) |
Package Create Date: | 2017-06-02 |
Package Last Update: | 2017-06-02 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-11 15:24:30 |
Package Statistics | |
---|---|
Total Downloads: | 14 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Laravel5 Repository include Service, Presenter and Repository. Repository is used to abstract the data layer, making application more flexible. Service is used to deal business logic. Presenter is used to deal View page.
composer require hskyzhou/repository
edit config.php
'providers' => [
...
HskyZhou\Repository\ServiceProvider::class,
],
如果需要使用接口,则在使用命令之后,在如上的数组中添加
'providers' => [
...
App\Providers\RepositoryServiceProvider::class,
],
Publish Configuration
php artisan vendor:publish --tag=config --provider "HskyZhou\Repository\ServiceProvider"
创建实例
php artisan make:entity Test
以上命令创建
####创建数据处理层
php artisan make:process Test
####创建业务逻辑
php artisan make:service Test
####创建页面预处理
php artisan make:presenter Test