2017 © Pedro Peláez
 

library repository

Laravel 5, Service - business logic, Presenter - preview deal view, Repository - database layer

image

hskyzhou/repository

Laravel 5, Service - business logic, Presenter - preview deal view, Repository - database layer

  • Friday, June 2, 2017
  • by xezw211
  • Repository
  • 1 Watchers
  • 1 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Laravel 5 Repository

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., (*1)

Table of Contents

Install

Composer

    composer require hskyzhou/repository

Laravel

edit config.php, (*2)

'providers' => [
    ...
    HskyZhou\Repository\ServiceProvider::class,
],

如果需要使用接口,则在使用命令之后,在如上的数组中添加, (*3)

'providers' => [
    ...
    App\Providers\RepositoryServiceProvider::class,
],

Publish Configuration, (*4)

php artisan vendor:publish --tag=config --provider "HskyZhou\Repository\ServiceProvider"

Command

创建实例, (*5)

php artisan make:entity Test

以上命令创建 1. migration 2. model 3. repositoryInterface 4. repositoryEloquent 5. service 业务逻辑 6. presenter 页面预处理 7. process(可选--命令会提示是否创建) 数据处理层, (*6)

创建数据处理层

php artisan make:process Test

创建业务逻辑

php artisan make:service Test

创建页面预处理

php artisan make:presenter Test

The Versions

02/06 2017

dev-master

9999999-dev

Laravel 5, Service - business logic, Presenter - preview deal view, Repository - database layer

  Sources   Download

MIT

The Requires

 

02/06 2017

1.0.2

1.0.2.0

Laravel 5, Service - business logic, Presenter - preview deal view, Repository - database layer

  Sources   Download

MIT

The Requires

 

02/06 2017

1.0.1

1.0.1.0

Laravel 5, Service - business logic, Presenter - preview deal view, Repository - database layer

  Sources   Download

MIT

The Requires

 

02/06 2017

1.0.0

1.0.0.0

Laravel 5, Service - business logic, Presenter - preview deal view, Repository - database layer

  Sources   Download

The Requires