定制 erfanshk/laravel-layered-logic 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

erfanshk/laravel-layered-logic

最新稳定版本:v0.0.1

Composer 安装命令:

composer require erfanshk/laravel-layered-logic

包简介

Layered Repositories, Services and Interfaces

README 文档

README

Latest Version run-tests Total Downloads

Under Development - Beta Release

A simple package to make repositories , services and their corresponding interfaces for laravel.

Works on

Laravel ^11.0

How to Install

Just run the command below and everything is ready.

composer require erfanshk/laravel-layered-logic

How it works

LayeredLogicInitServiceProvider gets registered on your laravel app, which comes with a simple command

php artisan make:layered User

It creates the following files:

  • App
    • Layers
      • Controllers
        • UserController
        • Requests
          • UserRequest
      • Resources
        • UserResource
        • Collection
          • UserCollection
      • Repositories
        • UserRepository
        • Interfaces
          • UserRepositoryInterface
      • Services
        • UserService
        • Interfaces
          • UserServiceInterface

It also registers repository and service interfaces as singletons in the published LayeredLogicServiceProvider in:

App\Providers\LayeredLogicServiceProvider

The binding array is located in

config\layered.php

By running:

php artisan make:layered {model}

it is automatically registered in the app container. Now you can use your pre-made UserService by injecting the UserServiceInterface anywhere in your application.

What you get by using this package?

It really depends on what coding style you have. LayeredLogic main objective is to bring abstraction to laravel models and controllers. It also makes the creating and registering of such easy and less time-consuming.

Development

If you have any ideas to enhance the package, I would be more than happy to hear from you.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固