Skip to content

frameworkwtf/generator

Repository files navigation

WTF Generator

Generates standard code for wtf modules.

Can generate following:

  • Entity
  • Controller
  • Migration
  • Seed
  • Route
  • Test
  • CRUD (Controller, Entity, Migration, Route, Test with selected name in one command)

Config

Place generator.php into any place

<?php
$app = dirname(__DIR__).'/';
return [
    'paths' => [
        'app' => $app,
        'controller' => $app.'src/Controller/',
        'entity' => $app.'src/Entity/',
        'test' => $app.'tests/',
        'route' => $app.'config/routes/',
    ],
];

Run generator with: bin/wtf generate:crud hello -c /path/to/generator-config.php

NOTE

  1. Generator is experiment project (yet)