PHP code example of tioncico / curd-automatic-generation
1. Go to this page and download the library: Download tioncico/curd-automatic-generation 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/ */
tioncico / curd-automatic-generation example snippets
$mysqlConfig = new \EasySwoole\ORM\Db\Config(\EasySwoole\EasySwoole\Config::getInstance()->getConf('MYSQL'));
$connection = new \EasySwoole\ORM\Db\Connection($mysqlConfig);
$tableName = 'user_list';
$tableObjectGeneration = new \EasySwoole\ORM\Utility\TableObjectGeneration($connection, $tableName);
$schemaInfo = $tableObjectGeneration->generationTable();
//初始化baseModel和BaseController
$baseController = new \AutomaticGeneration\InitGeneration\BaseController();
$baseController->generate();
$baseModel = new \AutomaticGeneration\InitGeneration\BaseModel();
$baseModel->generate();