Skip to content

Laravel 5 generator for prototyping. Creates model, views, controller and migration files with one command.

Notifications You must be signed in to change notification settings

JungleGenius/laravel-proto-generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

composer.json

"require-dev": {
    "dam1r89/proto-generator": "2.0.*"
},

add to app/config/app.php

    'dam1r89\ProtoGenerator\ProtoGeneratorServiceProvider',
    'Illuminate\Html\HtmlServiceProvider',



    'Form' => 'Illuminate\Html\FormFacade',
    'HTML' => 'Illuminate\Html\HtmlFacade',

##Example

php artisan proto post --fields='{"name":{}, "body":{}}'

##Flags

-r replace files withouth asking -t template folder - default standard -f fields -d additional context data -o output folder - default base

##Using from app

use dam1r89\ProtoGenerator\ContextDataParser;
use dam1r89\ProtoGenerator\Proto;

$parser = new ContextDataParser('users', ['first_name', 'last_name']);
$context = $parser->getContextData();

$context['additional_data'] = 'whatever';


$p = Proto::create('source/path/', base_path(), $context);
$p->generate(true);

About

Laravel 5 generator for prototyping. Creates model, views, controller and migration files with one command.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%