elmogy/larafast
Composer 安装命令:
composer require elmogy/larafast
包简介
Laravel : Develop Faster And Cleaner!
README 文档
README
To get started, require the package:
composer require elmogy/larafast
Install the package
After including larafast, you have to install it by running the following command:
php artisan larafast:install
After installing the package you will find a directory called unit_template inside core/Base, that's the directory that has the default views that will be included in every unit you generate (after running this command php artisan larafast:unit UnitName --module=ModuleName keep reading to learn more about this command).
Please take a look at the blade files inside core/Base/views and core/Base/unit_template you will notice that $global variable is shared across all the views.
Module
To create a new module, run the following:
php artisan larafast:module ModuleName
Here is an example:
php artisan larafast:module Todo
Unit
To create a new unit, there are 2 commands we have to run:
Initialization
php artisan larafast:unit UnitName --module=ModuleName --init
To initialize the unit with basic stuff (model, API controller and Web Controller) and after running the command you can configure the unit, here is an example:
php artisan larafast:unit Task --module=Todo --init
then navigate to core/Todo/data/Task.json and update it like in the following:
{
"attributes": {
"name": {
"type": "string"
},
"description": {
"type": "text",
"definition": "nullable"
},
"priority": {
"type": "enum:low,medium,high",
"definition": "nullable|default:medium"
},
"is_done": {
"type": "boolean",
"definition": "default:false"
}
},
"relations": {
}
}
Please note the following:
attributes: contains the unit attributes (you can think of attributes as the columns of the table in the database).
type: the type of the attribute, please check all available types here
definition: it holds the column modifiers & indexes in the database, please check all available modifiers & indexes from here and here
You may have noticed that the values in type and definition are designed the same way as we do in the validation rules.
Publishing
php artisan larafast:unit UnitName --module=ModuleName
To create all the related stuff (migration, request, resource, factory, unit test ...etc) based on the previous command:
php artisan larafast:unit Task --module=Todo
Notes
- when overriding a unit (for example Task unit) by running the command in
Publishingsection again, all related migration files will be deleted for this unit (for example create table migration file and adding new column/s migration file).
elmogy/larafast 适用场景与选型建议
elmogy/larafast 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 43 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 01 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「module」 「modules」 「laravel」 「fast」 「clean code」 「faster」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 elmogy/larafast 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 elmogy/larafast 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 elmogy/larafast 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This is Paymorrow module for OXID eShop.
Analysis module for finding problematical shop data.
yii2 swiper slider
An interactive tour through the TYPO3 backend.
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
Yii2 module to manage website content. Kind of a CMS...
统计信息
- 总下载量: 43
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-19