diff --git a/README.md b/README.md index 7dd075fc..4078a8fb 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ Laravel 5 Repositories is used to abstract the data layer, making our applicatio [![Analytics](https://ga-beacon.appspot.com/UA-61050740-1/l5-repository/readme)](https://packagist.org/packages/prettus/l5-repository) #### [See version 1.0.*](https://github.com/andersao/l5-repository/tree/1.0.4) +#### [See version 2.0.*](https://github.com/andersao/l5-repository/tree/2.0.14) #### [Migrate to 2.0](migration-to-2.0.md) +#### [Migrate to 2.1](migration-to-2.1.md) You want to know a little more about the Repository pattern? [Read this great article](http://bit.ly/1IdmRNS). @@ -691,9 +693,11 @@ The cacheable methods are : all, paginate, find, findByField, findWhere, getByCr ### Validators +Requires [prettus/laravel-validator](https://github.com/prettus/laravel-validator). `composer require prettus/laravel-validator` + Easy validation with `prettus/laravel-validator` -[For more details click here](https://github.com/andersao/laravel-validator) +[For more details click here](https://github.com/prettus/laravel-validator) #### Using a Validator Class @@ -812,6 +816,8 @@ Presenters function as a wrapper and renderer for objects. #### Fractal Presenter +Requires [Fractal](http://fractal.thephpleague.com/). `composer require league/fractal` + There are two ways to implement the Presenter, the first is creating a TransformerAbstract and set it using your Presenter class as described in the Create a Transformer Class. The second way is to make your model implement the Transformable interface, and use the default Prenseter ModelFractarPresenter, this will have the same effect. diff --git a/migration-to-2.1.md b/migration-to-2.1.md new file mode 100644 index 00000000..4afde17a --- /dev/null +++ b/migration-to-2.1.md @@ -0,0 +1,32 @@ +# Laravel 5 Repositories + +[![Analytics](https://ga-beacon.appspot.com/UA-61050740-1/l5-repository/migration-to-2.1)](https://packagist.org/packages/prettus/l5-repository) + +Some changes between version 2.0 and 2.1 + +## Migrate from version 2.0 to 2.1 + +### Lumen Support + +To use this package with Lumen , register the following service provider + +```php +$app->register(Prettus\Repository\Providers\LumenRepositoryServiceProvider::class); +``` + +### Composer requirements + +In version 2.0 some dependencies that could sometimes not be used in your project were always being downloaded regardless of whether they are used. In version 2.1 this package are as suggestions that will only be required if you want some features + + +#### [Validators](https://github.com/prettus/l5-repository#validators) + +If you want to use validations directly to your repository, as is disbelieved in Section [Validators](https://github.com/prettus/l5-repository#validators) , you need to use the library `prettus/laravel-validator`. + +`composer require prettus/laravel-validator` + +#### [Presenters](https://github.com/prettus/l5-repository#presenters) + +If you want to use presenters in your repository, you need to use the library [`league/fractal`](http://fractal.thephpleague.com/). + +`composer require league/fractal` \ No newline at end of file