louislam / louislam-crud
This package is abandoned and no longer maintained.
No replacement package was suggested.
An easy-to-use CRUD library for you to create a back-end system or RESTful API in a few minutes.
2.0.1
2019-03-20 08:38 UTC
Requires
- php: >=5.4.0
- almasaeed2010/adminlte: 2.3.*
- bootstrap-select/bootstrap-select: 1.12.*
- ckeditor/ckeditor: 4.7.*
- components/jquery: 1.11.*
- components/jqueryui: 1.11.*
- danielstjules/stringy: 3.*
- datatables/datatables: 1.10.*
- electrolinux/phpquery: 0.9.6
- fortawesome/font-awesome: 4.*
- gabordemooij/redbean: 4.3.*
- greenlion/php-sql-parser: 4.*
- ircmaxell/password-compat: 1.0.*
- league/plates: 3.3.*
- louislam/louislam-utilities: 1.0.*
- moment/moment: 2.19.*
- phpoffice/phpexcel: 1.8.*
- slim/slim: 2.6.*
This package is auto-updated.
Last update: 2024-09-29 23:00:12 UTC
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