Download the PHP package svensp/laravel-thin-repository without Composer
On this page you can find all versions of the php package svensp/laravel-thin-repository. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download svensp/laravel-thin-repository
More information about svensp/laravel-thin-repository
Files in svensp/laravel-thin-repository
Download svensp/laravel-thin-repository
More information about svensp/laravel-thin-repository
Files in svensp/laravel-thin-repository
Vendor svensp
Package laravel-thin-repository
Short Description Repository trait to add conditions and forget them on get/find
License MIT
Package laravel-thin-repository
Short Description Repository trait to add conditions and forget them on get/find
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-thin-repository
laravel-thin-repository
thin repository tries to make it simple to extend the beatiful chaining of conditions found in the laravel Eloquent querybuilder to a repository for this model.
Updating
- 1.0.0 -> 2.0.0: the condition and advancedCondition functions no longer take
the name as parameter with a default value. They instead return an
ElementRenamer which allows to specify a name via the
named
method.
Example:$this->condition(function() {})->named('user');
Install
laravel thin repository is installed via composer
composer install svensp/laravel-thin-repository
Use
The core of laravel thi repository is the ThinRepository trait. It will give you the following methods on your repository:
- public find() - findOrFail with the current conditions
- public get() - get with the current conditions
- protected condition(Closure $condition, string $name = null) - set a condition through a lambda function
- protected advancedCondition(Condition $condition, string $name = null) - set a
condition through an object implementing the
Condition
interface
Conditions will stack unless given a name. Conditions with the same name will override eachother.
All versions of laravel-thin-repository with dependencies
PHP Build Version
Package Version
No informations.
The package svensp/laravel-thin-repository contains the following files
Loading the files please wait ....