Package Data | |
---|---|
Maintainer Username: | nch7 |
Maintainer Contact: | nickeof@gmail.com (Nick Chikovani) |
Package Create Date: | 2015-07-21 |
Package Last Update: | 2015-07-21 |
Home Page: | |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2025-04-25 15:15:14 |
Package Statistics | |
---|---|
Total Downloads: | 7 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
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();
}
}