wtf/generator

Generator for WTF Framework

dev-master 2018-04-06 12:04 UTC

This package is auto-updated.

Last update: 2024-11-13 22:08:22 UTC


README

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)