PHPackages                             bulwark/dream - 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. [Search &amp; Filtering](/categories/search)
4. /
5. bulwark/dream

ActiveLibrary[Search &amp; Filtering](/categories/search)

bulwark/dream
=============

v1.0.2(8y ago)1971MITPHP

Since Dec 5Pushed 8y agoCompare

[ Source](https://github.com/bulwark1374/dream)[ Packagist](https://packagist.org/packages/bulwark/dream)[ RSS](/packages/bulwark-dream/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (6)Versions (3)Used By (1)

Dream
=====

[](#dream)

[![Latest version](https://camo.githubusercontent.com/f2e186495dc047ba3b9ad05b869cf0e9b2c5bc55a5dc9b10852112ed63d045e3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f62756c7761726b313337342f647265616d2e7376673f7374796c653d666c61742d737175617265)](https://github.com/bulwark1374/dream/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/65c541644a3281b0d545ff0291b5a7ff18f3e715864757efa474a4152943bca6/68747470733a2f2f7472617669732d63692e6f72672f62756c7761726b313337342f647265616d2e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.org/bulwark1374/dream)[![Coverage Status](https://camo.githubusercontent.com/eb91ff2d2b2292659a829b3a6eb495028e87c5b09ebef4c4c4b9080796ddf34f/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f62756c7761726b313337342f647265616d2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/bulwark1374/dream)[![Total Downloads](https://camo.githubusercontent.com/18bbb89ebcb1b0a4bd17042d58681e8b3db2607c5fe3b615e657b795f249e890/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f62756c7761726b2f647265616d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/bulwark/dream)

Introduction
------------

[](#introduction)

A Laravel base controller class and a trait that will enable to add filtering, sorting, eager loading and pagination to your resource URLs.

Functionality
-------------

[](#functionality)

- Parse GET parameters for dynamic eager loading of related resources, sorting and pagination
- Advanced filtering of resources using filter groups
- Use [Bulwark\\Architect](https://github.com/bulwark1374/architect) for sideloading, id loading or embedded loading of related resources
- ... [Ideas for new functionality is welcome here](https://github.com/bulwark1374/dream/issues/new)

For Laravel 5.4 and above

```
composer require bulwark/dream ~1.0
```

Usage
-----

[](#usage)

The examples will be of a hypothetical resource endpoint `/books` which will return a collection of `Book`, each belonging to a `Author`.

```
Book n ----- 1 Author

```

### Available query parameters

[](#available-query-parameters)

KeyTypeDescriptionIncludesarrayArray of related resources to load, e.g. \['author', 'publisher', 'publisher.books'\]SortarrayProperty to sort by, e.g. 'title'LimitintegerLimit of resources to returnPageintegerFor use with limitFilter\_groupsarrayArray of filter groups. See below for syntax.### Implementation

[](#implementation)

```
