lagan/lagan-todobackend
Composer 安装命令:
composer create-project lagan/lagan-todobackend
包简介
A Todo-Backend example built with Lagan.
README 文档
README
A Todo-Backend example built with Lagan.
Requirements
- PHP 5.5 or newer
- A database. I use MySQL in this repo for now, but others should work as well. Check out the RedBean documentation for that.
- An Apache webserver if you want to use the .htaccess URL rewriting. But other webservers should work as well; check out the Slim documentation for that.
- PDO plus driver for your database (Usually installed)
- Multibyte String Support (Usually installed too)
Install Lagan Todo-Backend
First install Lagan Todo-Backend and its dependencies with Composer with this command: $ php composer.phar create-project lagan/lagan-todobackend [project-name]
(Replace [project-name] with the desired directory name for your new project)
The Composer script creates the cache directory, config.php file and RedBean rb.php file for you.
Update config.php with:
- your database settings
- your server paths
- the admin user(s) and their password(s)
Lagan uses Slim HTTP Basic Authentication middleware to authenticate users for the admin interface. Make sure to change the password in config.php, and use HTTPS to login securely.
About the Lagan Todo-Backend
Todo content model
The Lagan Todo-Backend uses the Todo content model. This is in the Todo.php file in the models/lagan directory. It contains a type, a description and an aray with different content properties, just like any Lagan model.
If you want to work with Lagan, you can add your own content models by just adding class files like this to the models/lagan directory. Lagan will automatically create and update database tables for them. Nice!
Property types
The Todo content model the Boolean, Hashid, Slug and String property types. All property types have their own Lagan Property type controller. Each property type controller is a dependency, added with Composer using the composer.json file. This way new property types can be developed seperate from the Lagan project code. There are many more Lagan property type controllers available.
Todo-Backend API routes
The Todo-Backend API routes are in the todobackend.php file in the routes directory.
All routes in this directory are automatically included in your Lagan app.
Admin interface
Lagan comes with a web interface that is "automagically" created. You can enter the Lagan web interface by going to the /admin directory on the webserver where you installed Lagan. Here you can log in with the username and password you added in the config.php file. Now you can add or edit content objects based on the Lagan models.
Why use Lagan?
- Content models are easily created and modified
- Content models consist of a simple combination of arrays
- Content models can be any combination of properties
- Configuration and editing are separated
- All configuration is done by code, so developers are in control there
- Content can be edited with a web interface, so editors can do their thing
- The web interface is automagically created
- Lagan is built on proven open-source PHP libraries:
- It is easy to extend with new content property types
More about Lagan
You can learn more about Lagan on the Lagan website.
Lagan is a project of Lútsen Stellingwerff from HoverKraft, and started as the backend for Cloud 9.
lagan/lagan-todobackend 适用场景与选型建议
lagan/lagan-todobackend 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 02 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「rest」 「twig」 「api」 「cms」 「backend」 「content」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 lagan/lagan-todobackend 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 lagan/lagan-todobackend 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lagan/lagan-todobackend 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
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
A PSR-7 compatible library for making CRUD API endpoints
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-18