https://github.com/mevdschee/php-crud-ui
Single file PHP script that adds a UI to a PHP-CRUD-API project
https://github.com/mevdschee/php-crud-ui
Last synced: 9 months ago
JSON representation
Single file PHP script that adds a UI to a PHP-CRUD-API project
- Host: GitHub
- URL: https://github.com/mevdschee/php-crud-ui
- Owner: mevdschee
- License: mit
- Created: 2016-05-24T07:17:57.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-09-24T22:10:22.000Z (over 1 year ago)
- Last Synced: 2025-04-04T12:43:29.745Z (9 months ago)
- Language: PHP
- Homepage:
- Size: 2.63 MB
- Stars: 125
- Watchers: 11
- Forks: 56
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP-CRUD-UI
Single file PHP script that adds a UI to a [PHP-CRUD-API](https://github.com/mevdschee/php-crud-api) project
## Requirements
- PHP 7.0 or higher with PDO drivers for MySQL, PgSQL or SqlSrv enabled
## Installation
This is a single file application! Upload "`ui.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/ui.php/
Don't forget to modify the configuration at the bottom of the file.
## 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/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](https://getcomposer.org/) 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](https://github.com/mevdschee/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](https://github.com/mevdschee/php-crud-api) installation.