2017 © Pedro Peláez
 

library repository-pattern

Repository Pattern For Laravel >= 5.1.* | >= 5.2.* | >= 5.3.*

image

detatech/repository-pattern

Repository Pattern For Laravel >= 5.1.* | >= 5.2.* | >= 5.3.*

  • Friday, August 26, 2016
  • by detatech
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Repository Pattern For Laravel >= 5.1.* | >= 5.2.* | >= 5.3.*

Create Repository Pattern Files with a single command., (*1)

Usage

  • Require this package using composer
composer require detatech/repository-pattern:1.0.*
  • Update the $providers array in config/app.php
$providers = [
    // ... other serivce providers

    DetaTech\RepositoryPattern\RepositoryPatternServiceProvider::class,
];
  • Publish the default configuration (optional)
$ php artisan vendor:publish

You can now view the command repository:create has been listed in the artisan list. Checkout using, (*2)

$ php artisan list

Once you create the file, you have to bind it to the IoC container of the application. For that, open providers/AppServiceProvider and inside the register method, paste the following code:, (*3)

$repositoryFileNames = [
    // Whatever file name that you give while creating the file from
    // the terminal that same name should come here in single quotes(')
];

foreach ($repositoryFileNames as $key => $fileName) {
    // Notice the namespace..
    // Keep it default if you have not changed it,
    // Else, update the word _App_ with your application's namespace.

    $this->app->bind(
        "App\\Repositories\\Contracts\\{$fileName}Contract", "App\\Repositories\\Classes\\{$fileName}"
    );
}

Failing to do the above point will give Exception:, (*4)

Target [/path/to/Contract/File] is not instantiable

Done., (*5)

LICENSE

This package is open-sourced software licensed under the MIT license., (*6)

The Versions

26/08 2016

dev-master

9999999-dev

Repository Pattern For Laravel >= 5.1.* | >= 5.2.* | >= 5.3.*

  Sources   Download

MIT

The Requires

 

The Development Requires

by DetaTech Computers

26/08 2016

dev-dev

dev-dev

Repository Pattern For Laravel >= 5.1.* | >= 5.2.* | >= 5.3.*

  Sources   Download

MIT

The Requires

 

The Development Requires

by DetaTech Computers

26/08 2016

1.0.0

1.0.0.0

Repository Pattern For Laravel >= 5.1.* | >= 5.2.* | >= 5.3.*

  Sources   Download

MIT

The Requires

 

The Development Requires

by DetaTech Computers

25/08 2016

0.1.1

0.1.1.0

Repository Pattern for Laravel 5.3.*

  Sources   Download

MIT

The Development Requires

by DetaTech Computers

25/08 2016

0.1.0

0.1.0.0

Repository Pattern for Laravel 5.3.*

  Sources   Download

MIT

The Development Requires

by DetaTech Computers