Download the PHP package bitshost/php-crud-api-generator without Composer

On this page you can find all versions of the php package bitshost/php-crud-api-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-crud-api-generator

PHP CRUD API Generator

Expose your MySQL/MariaDB database as a secure, flexible, REST-like data API.
Auth (API key, Basic, JWT), OpenAPI docs, rate limiting, logging — zero code generation.

Version: 2.1.0 · Upgrade from ≤2.0.1


Design model (read this first)

This package is intentionally a data plane, not an application server and not GraphQL.

In this API Outside (your app / JS)
list / read / create / update / delete Joins & related graphs
bulk_create / bulk_delete Multi-step business workflows
filter / sort / paginate / count UI, domain rules, orchestration
auth, RBAC, table allow/deny Compose responses in JavaScript (or upMVC / mobile)

Fetch tables separately (or with filter=…:in:…), combine on the client.
Guide: Client-side joins.


Features

Docs: Roadmap


Security warning

Critical: dashboard.html and health.php expose ops/security metrics. Protect them before production.

→ Dashboard security · run php scripts/doctor.php


Installation

Option 1: Library (recommended)

Configs load from ./config or PHPCRUD_CONFIG_DIR.

Option 2: Standalone


Configuration

Older guides said to edit vendor/.../config — that is obsolete.

config/db.php

config/api.php (shape)

Full RBAC examples: config/apiexample.php. Details: CONFIGURATION.md.

Environment (.env)

Copy .env.example → .env. Overrides include:

DB_*, API_AUTH_METHOD, API_KEYS, BASIC_*_PASSWORD, JWT_*,
API_ALLOWED_TABLES, API_DENIED_TABLES (comma-separated).


Production checklist

SECURITY.md


Authentication modes

Mode Config Client
Off auth_enabled => false — (not for public internet)
API Key auth_method => apikey X-API-Key header (prefer over query string)
Basic auth_method => basic HTTP Basic
JWT auth_method => jwt POST ?action=login then Authorization: Bearer …
OAuth — Not implemented (always denies)

API endpoints

Entry: index.php or public/index.php + action=.

Action Method Example
tables GET ?action=tables
columns GET ?action=columns&table=users
list GET ?action=list&table=users
count GET ?action=count&table=users
read GET ?action=read&table=users&id=1
create POST ?action=create&table=users
update POST ?action=update&table=users&id=1
delete POST ?action=delete&table=users&id=1
bulk_create POST ?action=bulk_create&table=users
bulk_delete POST ?action=bulk_delete&table=users
openapi GET ?action=openapi
login POST ?action=login (JWT)

Example curl


Bulk operations

Bulk create

POST ?action=bulk_create&table=users — JSON array. Transactional (rollback on failure).

Bulk delete

POST ?action=bulk_delete&table=users


Count

GET ?action=count&table=users&filter=status:eq:active


Query features (list)

Param Description
filter col:op:value or col:value; comma-separated AND
sort Comma-separated; -col = DESC
page 1-based (default 1)
page_size Default 20, max 100
fields Comma-separated columns

Filter operators

Op Example
eq / bare name:eq:Alice or name:Alice
neq / ne status:neq:deleted
gt gte lt lte age:gt:18
like email:like:%@gmail.com
in / notin status:in:active\|pending
null / notnull deleted_at:null:
between age:between:18\|65

Response shape:


OpenAPI

Paste into https://editor.swagger.io/ or use dashboard.html.


Related data (client-side)

More: CLIENT_SIDE_JOINS.md.

Why not GraphQL / server joins by default? Another abstraction layer. With CRUD + filters you can move any data; composition stays in the client where each app can differ.


Security notes

Logging


Tests


Roadmap


License

MIT — see LICENSE.


All versions of php-crud-api-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
firebase/php-jwt Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bitshost/php-crud-api-generator contains the following files

Loading the files please wait ...