承接 dev-danno/laravel-repository-pattern 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

dev-danno/laravel-repository-pattern

最新稳定版本:1.0.0

Composer 安装命令:

composer require dev-danno/laravel-repository-pattern

包简介

Repository pattern implementation with simple commands in your Laravel application.

README 文档

README

Packagist License

This package is to implement the Repository Pattern with Laravel. It includes the creation and register of a custom ServiceProvider. It includes the binding in the ServiceProvider. It includes the creation of Model, Interface & implementation, Service class and Controller. Optional, includes creation and implementation of an Api Response Class.

Note

This package is compatible with Laravel >= 9

Caution

Use this package only if you required and plan to use a Repository Pattern based on Interface & Repository Class and dependency injection.

Installation 📌

  • Require the package using composer.
composer require dev-danno/laravel-repository-pattern --dev
  • Laravel uses Auto-Discovery, so it doesn't require to manually add the ServiceProvider.

  • Publish the config file

php artisan vendor:publish --tag=repository-pattern-config

Usage 🧰

Note

When using interface --repository or model --csir commands, it will automatically create the custom ServiceProvider & register it.

  • Api Response Class
php artisan make:response
  • Interface with resources
php artisan make:interface
  • Interface with resources, Repository class with resources and the corresponding binding.
php artisan make:interface --repository
  • Model with base structure
php artisan make:model
  • Model, Interface & Repository with resources, Service & Controller class with resources and Dependency Injection.

Note

If ApiResponseHelper class exists, the controllers will include it in the responses.

php artisan make:model --csir

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固