louislam/louislam-crud
最新稳定版本:2.0.1
Composer 安装命令:
composer require louislam/louislam-crud
包简介
An easy-to-use CRUD library for you to create a back-end system or RESTful API in a few minutes.
README 文档
README
Features
- "Write Less, Do More".
- Create/Update/Delete/ListView web interface.
- RESTful API.
- Auto create tables and fields for you.
- Extensible Field Types.
- Theme
- Work without any framework. (But work better with Slim Framework by default)
- Export to Excel format (Customizable)
- Support MySQL/MariaDB, SQLite, PostgreSQL and CUBRID.
Documentation
https://github.com/louislam/louislam-crud/wiki
Installation
Note: The library is under development and not tested very well currently.
Method 1: add louislam-crud to your composer.json
-
Require the library.
"require": { "louislam/louislam-crud": "3.x-dev" }
-
Compose the project with PHP Composer.
Method 2: Start a new project with bootstrap project.
- Download bootstrap project from: https://github.com/louislam/louislam-crud-bootstrap
- Compose the project with PHP Composer.
Method 3: Direct Download without Composer (Coming Soon)
Getting started with a simple example
-
Require and Import Libraries.
<?php require "vendor/autoload.php"; use LouisLam\CRUD\SlimLouisCRUD; use RedBeanPHP\R;
-
Setup a Database Connection (Support MySQL, SQLite etc.)
For SQLite:
R::setup('sqlite:dbfile.db');
For MySQL:
R::setup( 'mysql:host=localhost;dbname=mydatabase', 'user', 'password' );
More info: http://www.redbeanphp.com/index.php?p=/connection
-
Create a SlimLouisCRUD instance.
$crud = new SlimLouisCRUD();
-
Add a route for your table (product).
// Add a Route for "product" table $crud->add("product", function () use ($crud) { // Show and Ordering the fields $crud->showFields([ "id", "name", "price", "description" ]); });
-
Run the application.
$crud->run();
-
Open it in your browser.
http://<your hostname>/index.php/crud/product
louislam/louislam-crud 适用场景与选型建议
louislam/louislam-crud 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 963 次下载、GitHub Stars 达 24, 最近一次更新时间为 2015 年 08 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「admin」 「api」 「restful」 「backend」 「crud」 「louislam」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 louislam/louislam-crud 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 louislam/louislam-crud 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 louislam/louislam-crud 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
2lenet/EasyAdminPlusBundle
Analysis module for finding problematical shop data.
A PSR-7 compatible library for making CRUD API endpoints
This is a restful api to onesignal.
A RESTful API package for the Laravel and Lumen frameworks.
Simple and lightweight HTTP client based cURL
统计信息
- 总下载量: 963
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 25
- 点击次数: 24
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-15