Download the PHP package mnshankar/repository without Composer

On this page you can find all versions of the php package mnshankar/repository. 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 repository

Caffeinated Repository

This is a fork of the Caffeinated Repository package for LARAVEL 5.0 (using PHP 5.4)

Getting Started

Introduction

The Caffeinated Repository package implements a standard boilerplate repository interface. This covers the standard Eloquent methods in a non-static, non-facade driven way right out of the box. Fear not though Batman! The Caffeinated Repository package does not limit you in any way when it comes to customizing (e.g overriding) the provided interface or adding your own methods.

If you want database result caching to work, please note that you need a caching solution that supports "tags" (ex. Redis/Memcached). This package automatically caches data retrieved through the repository (for 60 mins). It also handles cache busting (based on tags) for data that is updated via the repository. In fact, it is for this feature that Caffeinated/repository requires the use of a caching store with Tags feature - It makes removing chunks of data from the cache easy.

Installing Caffeinated Repository

It is recommended that you install the package using Composer.

IMPORTANT: Also add the service provider to your app/config.php file - This sets up eventing so updates through your repository invalidate the cache, thus forcing a requery.

This package is compliant with PSR-1, PSR-2, and PSR-4. If you find any compliance oversights, please send a patch via pull request.

Using Repositories

Create a Model

Create your model like you normally would. We'll be wrapping our repository around our model to access and query the database for the information we need.

Create a Repository

Create a new Repository class - usually these classes are simply stored within a Repositories directory. There are a few requirements for each repository instance:

Injecting a Repository

Once you've built and configured your repository instance, you may inject the class within your controller classes where needed:

The interface defined in src/Contracts/Repository.php details the methods implemented by the EloquentRepository class. These are listed below for your convenience:

Event listeners in "Listeners\RepositoryEventListener" take care of invalidating cache on create, update and delete. Note that you may manually flush the cache associated with any of your repositories using

While these methods should take care of 80% of your needs, you may define additional methods as required by your app in your repository class. Refer to the EloquentRepository class for implementation details.


All versions of repository with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
illuminate/support Version 5.0.*
illuminate/config Version 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 mnshankar/repository contains the following files

Loading the files please wait ....