PHP code example of tunecino / yii2-schema-builder
1. Go to this page and download the library: Download tunecino/yii2-schema-builder 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/ */
$commands = [
// a string example representing the command to be executed
'yii migrate/up --interactive=0',
// a callable example returning a command or a list of commands to be executed
function($schema) {
// implement your logic here then
// return either a string or an array of strings
}
// a custom generator (where you can also set default form values)
[
'class' => 'tunecino\builder\generators\model\Generator',
'defaultAttributes' => [
'ns' => 'api\modules\v1\models',
'queryNs' => 'api\modules\v1\models',
],
],
];