awurth/slim-base
Composer 安装命令:
composer require awurth/slim-base
包简介
Slim PHP Micro-Framework skeleton
README 文档
README
This is an app skeleton for the Slim PHP Micro-Framework to get started quickly
Features
- Eloquent ORM
- Flash messages (Slim Flash)
- CSRF protection (Slim Csrf) with fields rendering with a twig function
- Authentication (Sentinel)
- Validation (Respect + Slim Validation)
- Twig templating engine Slim Twig View with cache and debug
- CSS Framework Bootstrap 4
- Webpack Encore for SASS and JS files compilation and minification
- Helpers for assets management, redirections, ...
- Logs (Monolog)
- Dotenv configuration
- Console commands for updating the database schema or creating users
- Functionnal tests base (PHPUnit)
For more information, check out the project's wiki.
Installation
Create the project using Composer
$ composer create-project awurth/slim-base [project-name]
Setup environment variables
Copy .env to a .env.local file and change the values to your needs. This file is ignored by Git so all developers working on the project can have their own configuration.
Download client-side libraries
$ yarn
or if you prefer to use npm
$ npm install
Webpack
This skeleton uses Webpack to manage assets. The CSS and Javascript files are located in assets/, so you have to use Webpack after creating your project to generate the minified files in public/, which will be ignored by Git.
Generate assets
If you just want to generate the default CSS and JS that comes with this skeleton, run the following command
$ yarn build
or
$ npm run build
If you want to run a watcher and begin coding
$ yarn watch
Setup cache files permissions
The skeleton uses a cache system for Twig templates and the Monolog library for logging, so you have to make sure that PHP has write permissions on the var/cache/ and var/log/ directories.
Update your database schema
First, create a database with the name you set in the .env* file. Then you can create the tables by running this command:
$ php bin/console db
awurth/slim-base 适用场景与选型建议
awurth/slim-base 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 617 次下载、GitHub Stars 达 67, 最近一次更新时间为 2017 年 01 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「twig」 「bootstrap」 「boilerplate」 「Skeleton」 「slim」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 awurth/slim-base 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 awurth/slim-base 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 awurth/slim-base 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
Shoot aims to make providing data to your templates more manageable
This Symfony bundle integrates PhpSpreadsheet into Symfony using Twig.
A Twig extension to insert css as inline styles with a tag
Caching and compression for Twig assets (JavaScript and CSS).
Twig extensions for Tracy Debugger
统计信息
- 总下载量: 617
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 67
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-01-18