Download the PHP package mzgs/fastcrud without Composer

On this page you can find all versions of the php package mzgs/fastcrud. 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 fastcrud

# FastCRUD **A fast and simple CRUD operations library for PHP with built-in pagination and AJAX support** [![PHP Version](https://img.shields.io/badge/PHP-8.0%2B-blue?style=for-the-badge&logo=php)](https://php.net) [![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE) [![Packagist](https://img.shields.io/badge/Packagist-fastcrud-orange?style=for-the-badge&logo=packagist)](https://packagist.org/packages/mzgs/fastcrud) [![Bootstrap](https://img.shields.io/badge/Bootstrap-5.x-purple?style=for-the-badge&logo=bootstrap)](https://getbootstrap.com) --- *Zero-config setup • AJAX-powered • Built-in pagination • Bootstrap 5 ready*

Table of Contents

Features

Zero-config CRUD with automatic pagination, search, and column sorting
AJAX-powered forms, inline editing, bulk updates, and real-time validation feedback
Nested tables, relations, and subselect support for modelling complex data
Lifecycle callbacks, custom columns, and field modifiers for fine-grained control
Built-in CSV export, soft-delete helpers, and configurable action buttons
Visual query builder to compose filters & sorts with reusable saved views
Global styling hooks and upload helpers so you can align the UI with your project

Installation

Requirements

PHP 8.0 or higher
PDO extension
Database - MySQL, PostgreSQL, SQLite, etc.
Bootstrap 5 for styling
jQuery for AJAX functionality

Quick Start

That's it! FastCRUD automatically generates a complete CRUD interface with pagination, search, and AJAX functionality.

What You Get Out of the Box

Example of a fully functional CRUD table generated with just 2 lines of code

Data Table with sorting, searching, and pagination
Inline Editing for quick updates
Forms for create/edit operations
Export to CSV
Bulk Actions for mass operations

Complete HTML Example


Configuration

Cacheable JavaScript

After Crud::init(), FastCRUD loads its shared JavaScript once from a versioned runtime URL on the same page endpoint. Browsers can cache it across tables and page loads; no asset publishing is required. This request serves only the packaged JavaScript and does not open a database connection.

To serve the asset directly through your web server instead, publish it into your application's public directory:

When working in this library's own checkout, use php bin/fastcrud-assets public/vendor/fastcrud instead.

Configure the browser URL before calling Crud::init() or rendering tables:

The URL must map to the published file through your web server; it is not a filesystem path. FastCRUD loads the runtime once per page and initializes each table with its own configuration, including nested tables loaded through AJAX. Continue including jQuery and Bootstrap as in the normal setup. No Node.js or JavaScript build step is required.

Run the publishing command again after Composer installs a new FastCRUD version, preferably as part of deployment. FastCRUD appends a content hash to the URL to invalidate the browser cache when the packaged script changes. Configure static-file caching in your web server as appropriate; the publishing command does not change server headers. Set CrudConfig::$script_url = null to use the automatic runtime URL again. Set it to an empty string ('') to embed the runtime once per PHP response. Rendering without Crud::init() also uses this inline fallback. Small inline initialization scripts remain in external mode.

Rendering Multiple Tables

Performance improvements apply automatically in both inline and external JavaScript modes:

CSV exports filter selected record keys in SQL before formatting rows. Full exports format up to 500 records at a time and spool CSV to a temporary stream, which spills to disk after 2 MB. Existing filters, visible columns, relation labels, row callbacks, CSV labels, and selection order are preserved. Whole-dataset before_fetch / after_fetch callbacks retain the previous in-memory path and run once; exports using those callbacks still require memory proportional to their result size. Batch exports do not provide a snapshot across concurrent database writes.

Search matching and page-number pagination retain their existing behavior. Database-specific indexes and query-plan tuning depend on your application's tables and workload; the library does not create application indexes automatically.

Column names, schema types, and PostgreSQL enum metadata are cached per PDO connection during each PHP request and shared across CRUD instances. The database editor clears this cache after schema changes. If your application executes DDL or switches the active database/schema itself, call \FastCrud\Database::clearSchemaCache($pdo) afterward. Long-running workers should call \FastCrud\Database::clearSchemaCache() between requests and create fresh CRUD instances.

Audit Logs

Crud::init() automatically ensures the fastcrud_audit_logs table exists on normal page requests when a PDO instance or database configuration is available. AJAX requests reuse that schema without repeating table or index creation. Initialize a normal page first, or call Database::ensureAuditLogTable($pdo) during setup for integrations that send AJAX requests directly. Enable logging per CRUD table:

FastCRUD writes audit rows for successful create, update, delete, batch delete, and duplicate operations. Update operations store one row per changed field; create, delete, and duplicate operations store the full row payload. Logs are saved in the same database:

You can also pass a callable user resolver that survives AJAX requests:

Common Recipes

These examples show complete, copy-pasteable patterns for the features most projects configure first.

Admin Table With Search, Sorting, Export, and Bulk Actions

Forms With Validation, Defaults, and Read-Only Fields

Field and Column Permissions

Use static booleans or callbacks to hide columns, hide form fields, or make fields read-only by mode or row.

Permission callbacks receive the current row, a context array with field or column, table, and mode, plus the Crud instance. Hidden and non-editable fields are also ignored server-side during create/update requests.

Upload Fields

Soft Delete With Audit Log

Lifecycle Callbacks

Custom Columns and Row Styling

Reusable Admin Presets

Row Buttons and Toolbar Actions

Nested Tables

Database Editor

FastCRUD includes a visual Database Editor that provides a web-based interface for managing your database schema. Create, modify, and organize tables and columns directly from your browser without writing SQL.

Features

Quick Start

Tip: If you have already called Crud::init([...]) (or otherwise configured CrudConfig) earlier in your bootstrap, you can simply call DatabaseEditor::init() — it will reuse the existing DB config/connection.

API Reference

Database Editor Class

Initialization
Rendering

Supported Operations

Table Management

Column Management

Data Types by Database

MySQL Types: BIGINT, BINARY(255), BIT, BOOLEAN, CHAR(36), DATE, DATETIME, DECIMAL(10,2), DOUBLE, FLOAT, INT, JSON, LONGTEXT, MEDIUMTEXT, SMALLINT, TEXT, TIME, TIMESTAMP, TINYINT, TINYINT(1), VARCHAR(255)

PostgreSQL Types: BIGINT, BIGSERIAL, BOOLEAN, DATE, DECIMAL(10,2), DOUBLE PRECISION, INTEGER, JSON, JSONB, NUMERIC(10,2), SERIAL, SMALLINT, TEXT, TIMESTAMP, UUID, VARCHAR(255)

SQLite Types: INTEGER, REAL, TEXT, BLOB, NUMERIC

Database Export

Security Features

Usage Tips


API Reference & Customization

All customization options are available through the main FastCrud\Crud class methods:

FastCrud\Crud - Main CRUD Class


Setup & Bootstrap


Table Display


Column Presentation


Field & Form Customization


Validation Helpers


Lifecycle Hooks

Lifecycle hook methods accept only serializable callbacks: named functions ('function_name'), static method strings ('Class::method'), or class/method arrays ([ClassName::class, 'method']). Closures are not supported because the configuration is serialized for AJAX.


Actions & Toolbar


Sorting, Filtering & Relationships


Query Extensions


Nested Data


Rendering & Data Access


Record Operations


FastCrud\CrudAjax - AJAX Request Handler


FastCrud\CrudConfig - Configuration Manager

Database Configuration

Global Settings

Upload fields use the built-in uploader with image thumbnails, file-type badges, progress, retry, and removal. Use image or file for one selection, and images or files for multiple selections. Drag the handle to reorder multiple files; the saved comma-separated filenames follow that order. Saving waits for uploads to finish.


Per-Table Text and Theme

All per-table style() / theme(['styles' => ...]) keys:

All text() / theme(['texts' => ...]) keys:

Template-style text values support these placeholders where relevant:


FastCrud\CrudStyle - Global Styling Configuration

Customize default CSS classes for buttons, rows, and components throughout FastCRUD by modifying these public static properties. All properties use Bootstrap 5 classes by default but can be overridden with any CSS framework.

All global CrudStyle options:

Toolbar & Action Buttons

Row Action Buttons

Tip: Use CrudStyle::$action_button_global_class for row action buttons and CrudStyle::$toolbar_action_button_global_class for top toolbar actions while still allowing per-button overrides. Setting a toolbar button property to any non-empty string (even the documented default) keeps the global toolbar class from applying to that button.

Panel & Form Buttons

Nested Tables & Grid

Action Button Icons

Usage Examples


FastCrud\DB - Database Connection


FastCrud\ValidationException - Validation Errors


License

This project is licensed under the MIT License - see the LICENSE file for details.


**Made by the FastCRUD Team** Found a bug? [Report it here](https://github.com/mzgs/fastcrud/issues) Like this project? Give it a star! Questions? [Start a discussion](https://github.com/mzgs/fastcrud/discussions)

All versions of fastcrud with dependencies

PHP Build Version
Package Version
No informations.
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 mzgs/fastcrud contains the following files

Loading the files please wait ...