定制 bfg/repository 二次开发

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

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

bfg/repository

最新稳定版本:v1.6.0

Composer 安装命令:

composer require bfg/repository

包简介

Missing repositories for Eloquent models Laravel

README 文档

README

Package To add the functionality of the repository pattern and its generator.

Install

composer require bfg/repository

About

The main feature of this package is the ability to remember the result of the executed function and return it when called again with the same parameters. How does this happen? When a repository property is called, it remembers the parameters and the result of the function. When the property is called again, it will return the result of the function that was remembered the first time it was called. For example, the repository has a getUsers() method that returns all users. The first time a method is called by a property, i.e. $repository->getUsers, it will execute the method and remember the result. When the property is called again, it will return the result of the method that was remembered the first time it was called.

Usage

Make repository

php artisan make:repository
Options:
      --methods[=METHODS]  Methods for repository (multiple values allowed)
  -m, --model[=MODEL]      Model of repository
  -f, --force              Create the class even if the repository already exists

Next step

After generating the repository you will appear in the app/Repositories folder. And then you can add your methods to the created repository.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固