承接 louislam/louislam-crud 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. Require the library.

    "require": {
        "louislam/louislam-crud": "3.x-dev"
    }
  2. Compose the project with PHP Composer.

Method 2: Start a new project with bootstrap project.

  1. Download bootstrap project from: https://github.com/louislam/louislam-crud-bootstrap
  2. Compose the project with PHP Composer.

Method 3: Direct Download without Composer (Coming Soon)

Getting started with a simple example

  1. Require and Import Libraries.

    <?php
    
    require "vendor/autoload.php";
    use LouisLam\CRUD\SlimLouisCRUD;
    use RedBeanPHP\R;
  2. 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

  3. Create a SlimLouisCRUD instance.

    $crud = new SlimLouisCRUD();
  4. 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"
        ]);
        
    });
  5. Run the application.

    $crud->run();
  6. Open it in your browser.

    http://<your hostname>/index.php/crud/product
    

    Alt screenshot

统计信息

  • 总下载量: 953
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 25
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 24
  • Watchers: 9
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-15