Bluzman is a set of command-line tools which provides a simple workflow with an application based and maintained by Bluz framework.
- Code-generator of the application components
- Shorthand for phinx and composer tools
- Shorthand for built-in web-server
- OS: Linux
- PHP: 7.3 (or later)
List of available commands
php ./vendor/bin/bluzman listAll generators don't rewrite exists files, but you can run generate command with flag --force, to rewrite all of them
For create new model you should run the following command in the terminal:
bluzman generate:model model_name table_name- model_name - the name of model. With this name will be created folder of model.
- table_name - the name of databases table for pattern formation properties object model.
For create new module you should run the following command in the terminal:
bluzman generate:module module_name [controller_name]...- module_name - the name of module. With this name will be created folder of module.
- controller_name - the name(s) of controller(s). With this name will be created controller and view. Optional.
For create new controller you should run the following command in the terminal:
bluzman generate:controller module_name controller_name- module_name - the name of module. With this name will be created folder of module.
- controller_name - the name of controller. With this name will be created controller and view.
For create CRUD class you should run the following command in the terminal:
bluzman generate:crud model_name Generator will create a class in model_name/Crud.php
If you want to generate CRUD controller and view you should run the next command:
bluzman generate:crud model_name module_nameGenerator will create a controller in module_name/controllers/crud.php and a view module_name/views/crud.php
For create REST controller you should run the following command in the terminal:
bluzman generate:rest model_name module_nameGenerator will create a controller in module_name/controllers/rest.php.
For create GRID class you should run the following command in the terminal:
bluzman generate:grid model_name Generator will create a class in model_name/Grid.php
If you want to generate GRID controller and view you should run the following command in the terminal:
bluzman generate:grid model_name module_nameGenerator will create a controller in module_name/controllers/grid.php and a view module_name/views/grid.php
Generator scaffold will generate:
For generate all of them run the following command in the terminal:
bluzman generate:scaffold model_name table_name module_nameAll
db:commandcommands is just shorthand to callphp /vendor/bin/phinx command -e default -c phinx.php
bluzman db:statusbluzman db:create UsersTablebluzman db:migratebluzman db:rollbackbluzman db:seed:create UserSeed# all seed
bluzman db:seed:run
# specified seed
bluzman db:seed:run UserSeedInformation about available modules will retrieve from https://github.com/bluzphp by
bluz-moduletag
Retrieve available modules:
bluzman module:listInstall module:
bluzman module:install authRemove module:
bluzman module:remove authFor run all tests:
bluzman testFor run specified group:
bluzman test module-optionsBluzman provides a commands list to operate with built-in PHP server.
To launch built-in PHP server you should run the following command in the terminal:
bluzman server:start --host[="..."] --port[="..."]By default server will be available by the address 0.0.0.0:8000 and you will see all logs in the terminal.
But there is an option to run server in the background, this requires an option -b:
bluzman server:start ... -bAnd if server launched in the background, it can be stopped with following command:
bluzman server:stop --host[="..."] --port[="..."]If you want to know the status of the server you should run the command in the terminal:
bluzman server:status --host[="..."] --port[="..."]