Skip to content

Laravel 4.2 package to generate repositories and gateways in a single artisan command

Notifications You must be signed in to change notification settings

nch7/laravel-repository-gateway-maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-repository-gateway-maker

Repositories and Gateways are cool, but we are sometimes too lazy to set them up.

This package solves the problem, it handles automatic initialization and creating new Repositories & Gateways for you!

#Instructions Install with composer

"nch7/laravel-repository-gateway-maker" : "dev-master"

Add package service provider to app.php

Nch7\LaravelRepositoryGatewayMaker\LaravelRepositoryGatewayMakerServiceProvider

Add psr-4 autoloading

"psr-4" : {
  "acme\\": "app/acme/"
}

Initialize

php artisan repogate:init

Add repository service provider to app.php

acme\Repositories\RepositoryServiceProvider

Create Gateway and Repository for specific model

php artisan repogate:make User

#Examples

<?php

use acme\Gateways\UserGateway;

class UsersController extends BaseController {

	public function __construct(UserGateway $users) {
		$this->users = $users;
	}

	public function index()
	{
		return $this->users->all();
	}

}

About

Laravel 4.2 package to generate repositories and gateways in a single artisan command

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages