PHPackages                             guosheng1987/laravel-repository-query - 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. guosheng1987/laravel-repository-query

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

guosheng1987/laravel-repository-query
=====================================

This package support a easy way to bind a parameter named `$filters` to your url. After that your Bulider instance can bind it into your `Where` condition

v0.1.2(9y ago)018BSD 2-ClausePHPPHP &gt;=5.5.9

Since Feb 9Pushed 9y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (4)Used By (0)

laravel-repository-query
========================

[](#laravel-repository-query)

> This package support Repository Parttern in Laravel. We create a parameter named 'filters' in our GET url. The Query Builder instance can accept it as where conditions so we don't have to write it in every modules.

### Require

[](#require)

- Laravel 5.3 (lower version will add in future)

### Install

[](#install)

Run the following command from you terminal:

```
composer require "guosheng1987/laravel-repository-query:0.1.*"

```

or add this to require section in your composer.json file:

```
"laravel-repository-query/repositories": "0.1.*"

```

last command

```
composer update

```

### Demo

[](#demo)

A simple demo could help us unserstand this library,Let's assume that we start to design our api which shows our users in diffent enterprises that contains several departments and positions. The relationship is Enterprises has some Departments,Department has some Positions,and Users belows to one of them,so we bulid four models '**User**','**Department**','**Position**','**Enterprise**' here

```
