slim4/gslim-skeleton
Composer 安装命令:
composer create-project slim4/gslim-skeleton
包简介
slim 4 microservice skeleton
README 文档
README
Useful framework for RESTful API development with JSON schema validation, using Slim PHP micro framework.
Used technologies: "PHP 7, Slim 4, MySQL, Doctrine, PHPUnit, dotenv & vagrant".
⚙️ QUICK INSTALL:
Requirements:
- Composer.
- PHP 7.2+.
- MySQL/MariaDB.
- or Vagrant.
With Composer:
You can create a new project running the following commands:
$ composer create-project slim4/gslim-skeleton [my-app]
Configure your connection to MySQL Server:
By default, the API use a MySQL Database.
You should check and edit this configuration in your scr/Config/.env file:
APP_URL=http://yourproject.lo/
APP_DEBUG=true
APP_ID=1
APP_ENV=local
#Database
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=gslim
DB_USERNAME=vagrant
DB_PASSWORD=vagrant
DB_CHARSET=utf8
DB_COLLATION=utf8_unicode_ci
DB_PREFIX=
# Cache twig
CACHE=false
#LOG_PATH
LOG_PATH='storage/logs/app.log'
📦 DEPENDENCIES:
LIST OF REQUIRE DEPENDENCIES:
- slim/slim: Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.
- slim/psr7: PSR-7 implementation for use with Slim 4.
- slim/csrf: Slim Framework CSRF Protection.
- doctrine/orm: Object Relational Mapper.
- justinrainbow/json-schema: JSON Schema for PHP.
- vlucas/phpdotenv: Loads environment variables from
.envtogetenv(),$_ENVand$_SERVERautomagically.
LIST OF DEVELOPMENT DEPENDENCIES:
- phpunit/phpunit: The PHP Unit Testing framework.
- symfony/console: The Console component eases the creation of beautiful and testable command line interfaces
PHP Slim command line: $ php slim
Slim Command Management Console 1.0
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Display help for a command
list List commands
migrate Perform database migration
make
make:command Create command file
make:controller Create interface controller
make:entity Create Entity e. g. UserAccess = tablename user_access
make:exception Create service interface
make:middleware Create Middleware
make:migration Create database migration file e. g. create_user_access_table / update_user_access_table
make:service Create service interface
make:trait Create interface trait
migrate
migrate:rollback Roll back the database migration
schedule
schedule:run Run timed task scheduling commands
🔖 ENDPOINTS:
BY DEFAULT:
-
CSRF Token:
GET /api/token -
Health Check:
GET /healthcheck
😎 THAT'S IT!
Now go build a cool SLIM API.
slim4/gslim-skeleton 适用场景与选型建议
slim4/gslim-skeleton 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 74 次下载、GitHub Stars 达 6, 最近一次更新时间为 2021 年 04 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「micro-framework」 「slim」 「Microservice」 「slim-framework」 「slim4」 「slim-4」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 slim4/gslim-skeleton 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 slim4/gslim-skeleton 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 slim4/gslim-skeleton 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Secure session middleware for Slim 3 framework
Библиотека для реализаций паттерна Pub/Sub
A simple and extensible PHP micro-framework.
Библиотека для реализаций паттерна Pub/Sub
Minimalistic Kernel and Routers based on Symfony Components
Implementation of the transactional outbox pattern on top of rekalogika/domain-event
统计信息
- 总下载量: 74
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-14