isayama3/larave-project-generator
最新稳定版本:v1.0.2
Composer 安装命令:
composer require isayama3/larave-project-generator
包简介
关键字:
README 文档
README
About
Develop faster and cleaner.
This package is responsible for generating laravel essential files for starting your application.
You dont need to make make command for each file like contoller, model, ....etc.
It's only one command and you are ready to start your application.
Installation
You can install the package via composer:
composer require isayama3/larave-project-generator
Usage
Init module data
- After installing the package. There is a generated folder called
datain our base bath directory with an example file for a module. - The files in
datadirectory are used to generate module files. - You need to add your own data in each file you gonna init.
example file for an admin module
return [ "name" => "admin", "request_type" => "api", "fields" => [ [ "name"=>"age", "type"=>"integer", "options"=>[ "nullable", ], "validation"=>[ "required", ] ], [ "name"=>"phone", "type"=>"string", "options"=>[ "default", "nullable", ], "validation"=>[ "required", "max:255", ] ], [ "name"=>"password", "type"=>"string", "options"=>[ "nullable", ], "validation"=>[ "required", "max:255", "password" ] ] ], "relations" => [ [ "relation_name"=>"orders", "relation_type"=>"hasMany", "relation_model"=>"order", ], [ "relation_name"=>"emails", "relation_type"=>"hasMany", "relation_model"=>"email", ], ], ];
Generate module files
-
Now you need to run this command to start creating your modules files.
-
The command will also create the module files in
app/Http/Controllersandapp/Modelsanddatabase/migrationsandapp/Http/Resourcesandroutes/api.phporroutes/web.phpbased onrequest_type.
php artisan generator:modules
Changelog
Please see the CHANGELOG for more information on what has changed recently.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-25