定制 jay-patel/service-repository 二次开发

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

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

jay-patel/service-repository

Composer 安装命令:

composer require jay-patel/service-repository

包简介

A package for implementing the repository pattern in Laravel applications, providing a structured approach to data access and manipulation. It creates service, repository, interfaces and migration and model.

README 文档

README

License

Introduction

Welcome to the Laravel Service Repository Package! This package streamlines the generation of files for implementing the service repository pattern in Laravel projects. By automating the creation of essential elements, it saves you time and ensures consistency in your codebase.

Features

  • Efficient File Generation: Automatically generates repository interfaces and implementations, service interfaces and implementations, model files, and optionally API controllers.
  • Customizable: Easily adjust file structure and content using stubs and configuration options.
  • User-Friendly: Simple command-line interface requiring just the model name to generate the necessary files.
  • Tested: Unit tests guarantee the package's reliability and functionality.

Installation

1. Install via Composer

composer require jay-patel/service-repository:^1.0.0

2. Publish Configuration File

php artisan vendor:publish --provider="JayPatel\ServiceRepository\ServiceRepositoryProvider"

Usage

Generate Service Repository Files

To generate the necessary files for a model, run the following command:

php artisan make:service-repository ModelName

Replace ModelName with the name of the model for which you want to generate the files. This command will create the following files:

  • Repository interface and implementation
  • Service interface and implementation
  • Model file and migration
  • Optionally, an API controller

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-04