Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Kodebyraaet/generators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kodebyraaet Generators for Laravel 5

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