PHPackages                             buqiu/repository - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. buqiu/repository

ActiveLibrary[Database &amp; ORM](/categories/database)

buqiu/repository
================

Laravel Repository 是 Laravel 的一个软件包，用于抽象数据库层。 这使应用程序易于维护。

v1.10.0(3y ago)32.8k2MITPHPPHP &gt;=7.2.0CI failing

Since Jan 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/buqiu/repository)[ Packagist](https://packagist.org/packages/buqiu/repository)[ RSS](/packages/buqiu-repository/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (5)Versions (11)Used By (0)

Laravel Repository
==================

[](#laravel-repository)

Laravel Repository 是 Laravel 的一个软件包，用于抽象数据库层。 这使应用程序易于维护。

安装
--

[](#安装)

从终端运行以下命令:

```
composer require buqiu/repository
```

使用
--

[](#使用)

#### 首先,使用以下命令创建存储库类:

[](#首先使用以下命令创建存储库类)

```
php artisan make:repository Film
```

其中 `Film` 是现有模型的名称.如果模型不存在,它将为您生成.

#### 最后,在控制器中使用存储库:

[](#最后在控制器中使用存储库)

```
