very useful genearator CRUD – Create Read Update Delete.
„require”: {
"dawid-daweb/scaffolding-generator": "dev-master"
}
PHP >= 5.4
<vendor_path>/dawid-daweb/scaffolding-generator/crud.php <command>/<param>
- create/<name_table> - create scaffolding
- back - delete last created crud file
- change/config - change config file
- help – show allowed commands
Module retrieves info on the table columns based on collected info are created class with query(selct, insert, delete, update) in PDO handle PDO is always put to constructor class, check default generated CRUD file . You can change template generated file.
it simple only nedd to use command
<vendor_path>/dawid-daweb/scaffolding-generator/crud.php create/<name_table>
- replace „<name_table>” to real name
when you need change template you must create template class instanceof daweb\crud\scaffoldingTemplate and pass name your new template with namespaces to config file.
<vendor_path>/dawid-daweb/scaffolding-generator/crud.php change/config
- this command will return path to config file edit him in your favorite file editor
<vendor_path>/dawid-daweb/scaffolding-generator/crud.php back