rez1pro/laravel-repository-pattern 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

rez1pro/laravel-repository-pattern

最新稳定版本:1.1.2

Composer 安装命令:

composer require rez1pro/laravel-repository-pattern

包简介

A Laravel package to implement the repository pattern in your applications.

README 文档

README

A Laravel package that implements the Repository Pattern to provide a clean separation between your business logic and data access layers.

Installation

Install the package via Composer:

composer require rez1pro/laravel-repository-pattern

Configuration

Register the Service Provider

Add the service provider to your bootstrap/app.php file:

return Application::configure(basePath: dirname(__DIR__))
    ->withProviders([
        \Rez1pro\RepositoryPattern\RepositoryServiceProvider::class,
    ])
    // ...existing code...

For Laravel versions < 11, add to config/app.php:

'providers' => [
    // ...existing providers...
    \Rez1pro\RepositoryPattern\RepositoryServiceProvider::class,
],

Usage

Artisan Commands

This package provides convenient Artisan commands to generate repository classes and interfaces:

Generate a Repository Class

php artisan make:repo {RepositoryName}

Example:

php artisan make:repo UserRepository

Generate a Repository Interface

php artisan make:interface {InterfaceName}

Example:

php artisan make:interface UserRepositoryInterface

Features

  • Clean separation of concerns
  • Easy-to-use Artisan commands
  • Follows Laravel conventions
  • Improves testability and maintainability

License

This package is open-sourced software licensed under the MIT license.

Support

For issues, questions, or contributions, please visit the GitHub repository.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-14