mevdschee / php-crud-admin

A database admin interface for MySQL, PostgreSQL or SQL Server in a single file PHP script.
MIT License
58 stars 21 forks source link
database multi-database mysql phpmyadmin postgresql sqlserver

PHP-CRUD-ADMIN

A database admin interface for MySQL, PostgreSQL or SQL Server in a single file PHP script.

PHP-CRUD-ADMIN screenshot

Requirements

Installation

This is a single file application! Upload "admin.php" somewhere and enjoy!

For local development you may run PHP's built-in web server:

php -S localhost:8080

Test the script by opening the following URL:

http://localhost:8080/admin.php/

Don't forget to modify the configuration at the bottom of the file.

Configuration

Use the 'api' config parameter to configure the embedded PHP-CRUD-API.

These are the most important 'api' configuration options and their default value between brackets:

For more information check out the PHP-CRUD-API documentation.

Compilation

You can install all dependencies of this project using the following command:

php install.php

You can compile all files into a single "ui.php" file using:

php build.php

NB: The install script will patch the dependencies in the vendor directory for PHP 7.0 compatibility.

Development

You can access the non-compiled code at the URL:

http://localhost:8080/src/admin/column/posts/list

The non-compiled code resides in the "src" and "vendor" directories. The "vendor" directory contains the dependencies.

Updating dependencies

You can update all dependencies of this project using the following command:

php update.php

This script will install and run Composer to update the dependencies.

NB: The update script will patch the dependencies in the vendor directory for PHP 7.0 compatibility.

Local or remote API

This script is powered by PHP-CRUD-API and embeds this project. Alternatively, it can run against a remote (live) installation.

If you want to run this against a remote installation, then replace the 'api' config parameter with one called 'url' that holds the base URL of your PHP-CRUD-API installation.