Simple PHP Slim Database CRUD application using SQLite3.
This project is a simple CRUD (Create, Read, Update, Delete) application built with PHP Slim and SQLite3. It provides a basic REST API for interacting with an SQLite database.
- Middleware for JSON parsing using PHP Slim.
- CRUD operations on any specified table.
- Easy to start and deploy.
To install and set up the project, follow these steps:
- Clone the repository:
git clone https://github.com/asilvafx/php-sqlite-crud.git
cd php-sqlite-crud
- Install the dependencies:
composer install
To start the server, run:
php -S localhost:8000
The server will start on the port specified in the .env file (default is 3000).
- Get all items from a specified table
GET /:tableName
- Create a new item in a specified table
POST /:tableName
- Update an item in a specified table
PUT /:tableName/:id
- Delete an item from a specified table
DELETE /:tableName/:id
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.