Download the PHP package prjkt/repofuck without Composer
On this page you can find all versions of the php package prjkt/repofuck. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download prjkt/repofuck
More information about prjkt/repofuck
Files in prjkt/repofuck
Package repofuck
Short Description Fucking with the repository design pattern
License MIT
Informations about the package repofuck
Repofuck
Fucking with the repository design pattern
Why?
Repofuck is dynamically persistent repository provider that also acts as a factory in runtime. Business logic can be written in the usual way or in closures if additional operations are needed before the data is given out. This eliminates the backdrop of needing predefined repository functions and replacing it by the entities themselves. Repofuck also features a dynamic mass assignment workflow where we can leverage predefined keys from Eloquent's getFillable
or assign our own keys to be persisted in the repository. This way, when we're about to save the entity. The data itself is already persisted and can be manipulated on the fly for additional operations.
Sample Usage
As you can see above. We are fetching data with the parameters with a relationship. The repository will be persisting the return of the callback and we can perform another operation. In which case we are performing a get.
Installing
composer require prjkt/repofuck
Prerequisites
- PHP v7
- Illuminate v5.1 or v5.2 or v5.3
- Support
- Database
- Container
- Contracts
All versions of repofuck with dependencies
illuminate/support Version ^5.1
illuminate/database Version ^5.1
illuminate/pagination Version ^5.1
illuminate/container Version ^5.1
illuminate/contracts Version ^5.1