<?php
function generateCRUD(string $table, array $columns): string {
$code = "<?php\n";
$code .= "class {$table}Model {\n";
foreach ($columns as $col) {
$code .= " public string \${$col};\n";
}
$code .= "}\n";
return $code;
}
Sign in to leave a comment.
Sign In