kodebyraaet / generators
A collection of generators
Installs: 1 146
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 10
Forks: 0
Open Issues: 0
Requires
- php: >=5.5.9
- illuminate/console: ^5.1
- illuminate/filesystem: ^5.1
Requires (Dev)
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~4.6
README
A collection of generators.
Installation
Install composer dependency.
composer require kodebyraaet/generators --dev
If you are using Laravel, add the provider in config/app.php
.
Kodebyraaet\Generators\GeneratorsServiceProvider::class
If you are using Lumen, add the provider in bootstrap/app.php
.
$app->register(Kodebyraaet\Generators\GeneratorsServiceProvider::class);
Available Commands
Command | Description |
---|---|
php artisan make:entitiy Name [--models={Additional models}] [--seed] [--migration] | Create the a entity folder with a model, repository, interface and service provider |
php artisan make:base-repository | Create the base repository that is needed by the objects created by make:entity command, this should only be ran once |
Example Usage
php artisan make:entity Project --models=Person,Job --seed --migration
This will create the following files and folders:
+-- App
| +-- Entities
| +-- Project
| +-- Contracts
| +-- ProjectInterface.php
| +-- Models
| +-- Project.php
| +-- Person.php
| +-- Job.php
| +-- Repositories
| +-- ProjectRepository.php
| +-- ProjectServiceProvider.php
+-- database
| +-- migrations
| +-- 2015_08_19_110000_Create_Projects_table.php
| +-- seeds
| +-- ProjectTableSeeder.php