Skip to content
Search

Php-crud-api

lastmod 2021-08-19created 2021-08-192 edits

Add a REST API to a DB with a single file

About

  • Easily add a feature-rich REST API to MySQL, PostgrSQL, SQL Server, and SQLite
  • A PHP implementation of TreeQL, a query language that returns structured JSON
  • Easy installation (Composer or a single file)

Supported features

  • Small code that is easy to adopt and maintain
  • DB/table/column/record permission system
  • Input sanitizing and validation using rules and callbacks
  • JSON objects/arrays can be passed as input
  • Multi-tenant single & multi DB layout support
  • Multi-domain CORS support
  • Can read joined results from multiple tables
  • Compound search support
  • Pagination, sorting, Top N lists, and column selection support
  • Nested results for belongsTo, hasMany, HABTM (has_and_belongs_to_many)
  • Atomic increment support using PATCH (for counters)
  • Binary field support using base64 encoding
  • Spatial/GIS field and filter support using WKT/GeoJSON
  • API documentation generation using OpenAPI tools
  • API Key, JWT token, username/password authentication
  • DB connection settings specified per authentication
  • Supports reading the database structure as JSON
  • Database structure can be changed in a REST manner

Projects

  • JS-CRUD-API : JS client library for PHP-CRUD-API
  • PHP-API-AUTH : single-file authentication provider for PHP-CRUD-API
  • PHP-CRUD-UI : single-file UI for PHP-CRUD-API
  • PHP-CRUD-ADMIN : single-file database administration interface for PHP-CRUD-API
  • PHP-SP-API : add a REST API to an SQL database with a single file
  • VUE-CRUD-UI : add a Vue UJ to PHP-CRUD-API with a single file

See also

Favorite site

author Zer0 sitemap