Download the PHP package dezsidog/laravel-repository without Composer
On this page you can find all versions of the php package dezsidog/laravel-repository. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package laravel-repository
laravel repository
laravel repositories is used to abstract the data layer, making our application more flexible to maintain.
bad english
will be tested soon.
language
feature
- yii expands: you can append
expands=xxx,xx
to url for extra fields by call the relation methods - filters: you can append
filters[fieldName]=xxx&filters[fieldName2]=xx
to url for search records by given condition. - custom filters: you can add or cover the filter methods.
- sort: you can append
sorts[name]=asc
to url for sort records by given field. - custom filters: you can add or cover the sort methods.
install
usage
create model
create repository
add repository to controller
then you can
expands
if model has relations.
you can
-
just append expands field to url:
- or make expands auto
filters
to search something by
you can use relations
custom filters
add method named filterBy + key name
, to custom filters.
then make url:
you can just cover the exists field
sort
to sort something by
you can not use relations
custom sorts
add method named sortBy + key name
, to custom sorts.
then make url:
you can also cover the exists field
All versions of laravel-repository with dependencies
PHP Build Version
Package Version
The package dezsidog/laravel-repository contains the following files
Loading the files please wait ....