aindong/custom-generator

A custom generator that would generate a new feature for a repository pattern application

1.0 2015-04-09 13:10 UTC

This package is not auto-updated.

Last update: 2024-11-09 17:56:06 UTC


README

A laravel custom generator inspired by the generator packaged of jeffrey way. This generator will generate files that are needed for a repository pattern structure.

Installation

  1. Add this into your laravel composer.json file, under require
"require-dev": {
  "aindong/custom-generator": "dev-master"
}
  1. Open up your terminal and run
composer update
  1. After downloadign the package. Open up your app/config/app.php file and inside the $providers array add this
'Aindong\CustomGenerator\Providers\CustomGeneratorServiceProvider',
  1. If errors occured like, it can't find the package. Run
composer dumpautoload -o

Usage

  1. Inside your app folder, create a customized folder name that will contain all of your features. For example I created an Acme Folder
-app
--Acme
  1. And under your custom folder, create a Features folder.
-app
--Acme
---Features
  1. Now on your terminal, type
php artisan generate:feature featurename --path=app/Acme --namespace=Acme
  1. TADA! now check your features folder for the magic!

Notes

This package already has an interface and an abstract of a regular crud process of eloquent built in. But you can always change or create your own.

Notes

This package is still under development but I'm already using it to make my work faster and reduce the time of creating new files and restructuring them. Feel free to suggest.