toanna/saf-laravel-toolkit
Composer 安装命令:
composer require toanna/saf-laravel-toolkit
包简介
A development toolkit for SAF's Laravel Developers
README 文档
README
A development toolkit for SAF's Laravel Developer
Get started
$ composer require toanna/saf-laravel-toolkit
Commands
Initialize folder structure
$ php artisan saf:init
Folder structure:
/app
/Abstraction
/ExternalServiceInterface
/RepositoryInterface
/Business
/BusinessService
/Common
/CircuitBreaker
/DomainModels
/Exceptions
/ExternalConfig
/Logging
/Dependency
/ExternalServices
/Repositories
/Providers
/Representation
/Console
/Http
/Controllers
/Api
/Auth
/Middleware
/Requests
Kernel.php
Initialize git hooks
After connect with your remote, run this to setup:
$ php artisan saf:git-hooks-init
Creating Commands
Create an Abstraction Interface to app/Abstraction/:
$ php artisan saf:abstraction ExternalServiceInterface/IFileUploader
Create a Business Logic Class to app/Business/:
$ php artisan saf:business CreateFileBL
Create a Business Service Class to app/BusinessService/:
$ php artisan saf:business_service CreateFileBS
Create a Controller Class to app/Representation/Http/:
$ php artisan saf:controller TestController
Create an API Controller Class to app/Representation/Http/Api:
$ php artisan saf:api_controller FileController
Create a Dependency Class to app/Dependency/:
$ php artisan saf:dependency Repositories/SQLFileCreator
Create a Domain Model Class to app/Common/DomainModels:
$ php artisan saf:domain_model File
Create an Eloquent ORM Class to app/Dependency/Repositories/Eloquent/:
$ php artisan saf:eloquent FileEloquent
Create an Exception Class to app/Common/Exceptions/:
$ php artisan saf:exception ValidationException
Create a Form Request Class to app/Representation/Http/Requests/:
$ php artisan saf:request CreateFileRequest
Create a Resource to app/Representation/Http/Resources/:
$ php artisan saf:resource
Create a Artisan Command to app/Representation/Console/Commands/:
$ php artisan saf:console AbstractionMakeCommand
Common Libraries
Elastic Logger
Example in app/config/logging.php:
'stack' => [
'driver' => 'stack',
'channels' => ['daily', 'elastic'],
],
'elastic' => [
'driver' => 'custom',
'via' => Toanna\SAFLaravelToolkit\Common\Logging\ElasticLogger::class,
'host' => 'localhost',
'port' => 9200,
'level' => 'debug'
],
Contributors
- Thắng Lê thang.le@saf.com.vn
- Toàn Nguyễn toan.nguyen@saf.com.vn
toanna/saf-laravel-toolkit 适用场景与选型建议
toanna/saf-laravel-toolkit 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.22k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2018 年 12 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 toanna/saf-laravel-toolkit 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 toanna/saf-laravel-toolkit 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.22k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-02