bfg / wood
Laravel's advanced framework controller for a code generation, change your framework quickly and easily. Automate all the same tasks with best code generator.
Installs: 104
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 1
Open Issues: 0
Type:bfg-app
Requires
- php: ^8.0
- bfg/attributes: ^1.2
- bfg/comcode: ^1.1.0
- elementaryframework/fire-fs: ^1.2
- laravel/framework: ^8.0|^9.0|^10.0
- workerman/workerman: ^4.1
This package is auto-updated.
Last update: 2024-10-24 19:47:27 UTC
README
Install
composer require bfg/wood
Description
Laravel's advanced framework controller for a code generation, change your framework quickly and easily. Automate all the same tasks with best code generator.
Json mode demo
Quick start
In order to start generating in json format, run the php artisan wood:install
command in order to create the generator database, then create a json file using the php artisan wood:import
command, after which in your folder database
file wood.json
will appear. In it, you describe your files according to the scheme. Once the schema is complete, we call the php artisan wood:build
command to collect all the changes. And every time you change the schema, jason runs the php artisan wood:build
command.
Commands
php artisan wood:install
- Set the initial database for the generatorphp artisan wood:run
- Start generation processphp artisan wood:build
- Build data fromJSON
filephp artisan wood:import
- Import all data from table and createJSON
filephp artisan wood:sync
- Synchronize primary data of existing models into tables
JSON structure
<value>
- Data by default
{ "models": [ { "class": "string", "foreign": "string<id>", "increment": "bool<true>", "auth": "bool<false>", "created": "bool<true>", "updated": "bool<true>", "deleted": "bool<true>", "migration": "bool<true>", "fields": [ { "name": "string", "cast": "string<string>", "type": "string<string>", "type_parameters": "array<[]>", "has_default": "bool<false>", "default": "string<null>", "hidden": "bool<false>", "nullable": "bool<false>", "unique": "bool<false>", "index": "bool<false>", "comment": "string<null>", "type_details": "array<[]>" } ], "relations": [ { "related_model": "class", "name": "string<null>", "type": "string<hasOne>", "reverse_name": "string<null>", "reverse_type": "string<hasMany>", "able": "string<null>", "with": "bool<false>", "with_count": "bool<false>", "nullable": "bool<false>", "cascade_on_update": "bool<true>", "cascade_on_delete": "bool<true>", "null_on_delete": "bool<false>" } ], "observers": [ { "class": "string", "events": "array" } ], "traits": [ { "class": "string" } ], "implements": [ { "class": "string" } ] } ], "events": [ { "class": "string", "listeners": [ { "row": "string" } ] } ], "controllers": [ { "class": "string", "methods": [ { "row": "string", "event": "class" } ] } ], "factories": [ { "model": "class", "lines": [ { "field": "string", "php": "string<null>" } ] } ], "seeds": [ { "class": "string", "model": "class", "factory": "bool<false>", "count": "int<1>", "rows": [ { "row": "array" } ] } ], "requests": [ { "class": "string", "access": "string<'true'>", "rules": [ { "name": "string", "rules": "array" } ] } ], "resources": [ { "class": "string" } ] }
Application documentation
We have extensive documentation in which you can get acquainted with the bfg wood.