此包已被废弃且不再维护。未建议替代包。

Laravel 仓库包,用于检索、过滤和排序模型

1.0.0 2016-05-12 21:58 UTC

This package is auto-updated.

Last update: 2023-01-29 02:33:12 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Laravel 仓库包,用于检索、过滤和排序模型

该仓库类提供了一个有见解的方式来查询您的 eloquent 模型。

安装

通过 Composer

$ composer require thinktomorrow/repo

使用

    
<?php

namespace App\Domain;

use Thinktomorrow\Repo\BaseRepository;
use Thinktomorrow\Repo\Filterable;
use Thinktomorrow\Repo\Sortable;

class ChildRepository extends BaseRepository{

    use Filterable, Sortable;

    public function __construct(ModelStub $model)
    {
        $this->setModel($model);
    }
}
    

测试

$ vendor/bin/phpunit

安全

如果您发现任何与安全相关的问题,请通过电子邮件 ben@thinktomorrow.be 而不是使用问题跟踪器。

致谢

许可

MIT 许可证 (MIT)。请参阅 许可文件 获取更多信息。