- "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.
https://github.com/louislam/louislam-crud/wiki/Quick-API-and-Reference
Note: The library is under development and not tested very well currently.
-
Require the library.
"require": { "louislam/louislam-crud": "1.0.*" }
-
Compose the project with PHP Composer.
- Download bootstrap project from: https://github.com/louislam/louislam-crud-bootstrap
- Compose the project with PHP Composer.
-
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