项目
在 GitHub 查看
GooGee/Entity-Builder
关于
🍅 Laravel 低代码构建器。
网站与应用开发可以做什么
- design database schemas
- manage database migrations
- generate OpenApi document
- generate CRUD files
实测星标增长
- 24小时
- -1
- 7天
- -1
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Laravel Builder
Intuitive productivity tool for Laravel. demo
You no longer need to write migrations, Doctrine will do it for you.
PhpStorm plugin Laravel Builder
PhpStorm plugin Laravel Generator
features
- design database schemas
- manage database migrations
- generate OpenApi document
- generate CRUD files
install
composer require --dev googee/laravel-builder
php artisan vendor:publish --provider="GooGee\LaravelBuilder\LaravelBuilderServiceProvider"
php artisan setupLaravelBuilder
'user' => [
'driver' => 'daily',
'path' => storage_path('logs/user.log'),
'level' => env('LOG_LEVEL', 'debug'),
],
how to generate migrations?

- go to
Migrationpage, then select theUserin sidebar - click
▼button to generate theEntityfile - click
diffbutton to generate a migration file - click
►|button to runphp artisan migrate - to ignore a table, add its name to the file
config/laravelbuilder.php
Doctrine compares files in database/Entity with the database schemas, and generate a migration file of their difference.
how to generate CRUD files?

- go to
Entitypage, then selectUserin sidebar - select
Filetab, then click▼button to generate the file
how to generate OpenApi document?
- click
OpenApiin the menu bar - click
toJSONbutton, then copy the text - click
editorlink, then paste in the editor
how file is generated?
for example, lets generate the User Entity file.
when ▼ button is clicked, this plugin will do the following:
- GUI fetch all files in
laravel-builder/code - execute code in
code-helper.js - execute code in
file-1.js(1is the id ofEntity) - render template
file-1.txt - write the result text to
database/Entity/User.php
how to generate custom files?
- go to
Treepage, then select a file in sidebar - click
editscript button to modify the code (optional) - click
edittemplate button to modify the text - go to
Entitypage, then selectUserin sidebar - select
Filetab, then click▼button to generate the file
Note: if changes didn't work, make sure to save the changed file manually, PhpStorm doesn't save the changed file immediately.
for example
function run(data) {
/** @type {DataForScript} */
const ddd = data
// define variable `model`
ddd.model = ddd.db.tables.File.find(item => item.name === 'Model')
// define function `toString`
ddd.toString = function(object) {
return JSON.stringify(object)
}
}
in template
{{ model.name }}
{{ toString(model) }}
探索相关项目
加载中…