Download the PHP package reynholm/laravel-repositories without Composer

On this page you can find all versions of the php package reynholm/laravel-repositories. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-repositories

Laravel Repositories

Latest Stable Version Build Status Coverage Status Total Downloads License

Repository pattern for Laravel

Installation and Configuration

Add this to your composer.json

Abandoned!

This package is abandoned as you can see on packagist. I moved to python and I have no time for keeping this repo up to date with Laravel. Feel free to fork it and maintaining it yourself.

Notice

I think that you can use it even that is on an early stage, but I may make some breaking changes so if you don't want any surprises just don't put "dev-master" or an asterisk as your composer version. Be smart!

If you put your version like on the above example you will not get any breaking changes.

Usage

Simply extend the abstract class Reynholm\LaravelRepositories\Repository\LaravelRepository

Example

Fetch Mode

You can also choose the fetcher that you like the most or create your own. You can select the one that you prefer from the LaravelRepositoryInterface constants. Example:

So the repository will return a Illuminate\Support\Collection with objects.

Currently implemented methods:

Timestamps

You can add timestamps adding the $timestamps = true property:

By default it will manage created_at and updated_at fields. You can override the created and updated fields using the following properties:

Validation

You can validate your data with the validate methods. Specify the rules of your repository in the rules property:

Examples:

Extending the repository with your custom methods

You can grab the builder instance with

to create your custom repository methods.

Example

A best practice would be to create a new interface for MyUsersRepository with all of the new methods that you are going to add.

And then implement it on your repository:

So if you want to change the implementation you would need to implement the MyUsersRepositoryInterface and LaravelRepositoryInterface.

Future

More features coming soon


All versions of laravel-repositories with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version 4.*
illuminate/database Version 4.*
lisachenko/go-aop-php Version 0.5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package reynholm/laravel-repositories contains the following files

Loading the files please wait ....