PHP code example of ekhaled / f3-cortex-model-generator

1. Go to this page and download the library: Download ekhaled/f3-cortex-model-generator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ekhaled / f3-cortex-model-generator example snippets


"ekhaled/f3-cortex-model-generator": "1.0"

#!/usr/bin/env php

'             => 'path/to/output/folder/',
    'DB'                 => array(), //DB connection params
    'namespace'          => 'Models\\Base',
    'extends'            => '\\Models\\Base',
    'relationNamespace'  => '\\Models\Base\\',
    'template'           => 'path/to/template/file',
    'indentation'        => array(),
    'exclude'            => array()
];

$generator = new \Ekhaled\Generators\MySQL\Model($config);
$generator->generate();


{{NAMESPACE}}

class {{CLASSNAME}} {{EXTENDS}}
{

    protected $fieldConf = [
{{FIELDCONF}}
    ],
    $table = '{{TABLENAME}}';

}