2017 © Pedro Peláez
 

library bluzman

Bluzman - Simple workflow manager for Bluz Skeleton

image

bluzphp/bluzman

Bluzman - Simple workflow manager for Bluz Skeleton

  • Thursday, January 18, 2018
  • by bluzphp
  • Repository
  • 3 Watchers
  • 3 Stars
  • 1,233 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 18 Versions
  • 0 % Grown

The README.md

Bluzman - Simple workflow manager for Bluz Framework

Bluzman is a set of command-line tools which provides a simple workflow with an application based and maintained by Bluz framework., (*1)

Achievements

PHP >= 7.3+, (*2)

Latest Stable Version, (*3)

Build Status, (*4)

Scrutinizer Code Quality, (*5)

Coverage Status, (*6)

Total Downloads, (*7)

License, (*8)

Features

  • Code-generator of the application components
  • Shorthand for phinx and composer tools
  • Shorthand for built-in web-server

Requirements

  • OS: Linux
  • PHP: 7.3 (or later)

Usage

List of available commands, (*9)

php ./vendor/bin/bluzman list

Code generators

All generators don't rewrite exists files, but you can run generate command with flag --force, to rewrite all of them, (*10)

Model generator

For create new model you should run the following command in the terminal:, (*11)

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.

Module generator

For create new module you should run the following command in the terminal:, (*12)

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.

Controller generator

For create new controller you should run the following command in the terminal:, (*13)

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.

CRUD generator

For create CRUD class you should run the following command in the terminal:, (*14)

bluzman generate:crud model_name 

Generator will create a class in model_name/Crud.php, (*15)

If you want to generate CRUD controller and view you should run the next command:, (*16)

bluzman generate:crud model_name module_name

Generator will create a controller in module_name/controllers/crud.php and a view module_name/views/crud.php, (*17)

REST generator

For create REST controller you should run the following command in the terminal:, (*18)

bluzman generate:rest model_name module_name

Generator will create a controller in module_name/controllers/rest.php., (*19)

GRID generator

For create GRID class you should run the following command in the terminal:, (*20)

bluzman generate:grid model_name 

Generator will create a class in model_name/Grid.php, (*21)

If you want to generate GRID controller and view you should run the following command in the terminal:, (*22)

bluzman generate:grid model_name module_name

Generator will create a controller in module_name/controllers/grid.php and a view module_name/views/grid.php, (*23)

All-in-one generator - scaffold

Generator scaffold will generate:, (*24)

For generate all of them run the following command in the terminal:, (*25)

bluzman generate:scaffold model_name table_name module_name

Migrations

All db:command commands is just shorthand to call php /vendor/bin/phinx command -e default -c phinx.php, (*26)

Status

bluzman db:status

Create migration

bluzman db:create UsersTable

Migrate

bluzman db:migrate

Rollback last migration

bluzman db:rollback

Create seed

bluzman db:seed:create UserSeed

Apply seed data

# all seed
bluzman db:seed:run
# specified seed
bluzman db:seed:run UserSeed

Install and remove modules

Information about available modules will retrieve from https://github.com/bluzphp by bluz-module tag, (*27)

Retrieve available modules:, (*28)

bluzman module:list

Install module:, (*29)

bluzman module:install auth

Remove module:, (*30)

bluzman module:remove auth

Tests

For run all tests:, (*31)

bluzman test

For run specified group:, (*32)

bluzman test module-options

Server

Bluzman provides a commands list to operate with built-in PHP server., (*33)

To launch built-in PHP server you should run the following command in the terminal:, (*34)

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., (*35)

But there is an option to run server in the background, this requires an option -b:, (*36)

bluzman server:start ... -b

And if server launched in the background, it can be stopped with following command:, (*37)

bluzman server:stop --host[="..."] --port[="..."]

If you want to know the status of the server you should run the command in the terminal:, (*38)

bluzman server:status --host[="..."] --port[="..."]

The Versions