Skip to content

Simple PHP Slim Database CRUD application using SQLite3.

License

Notifications You must be signed in to change notification settings

asilvafx/php-sqlite-crud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP SQLite CRUD

Simple PHP Slim Database CRUD application using SQLite3.

Table of Contents

Introduction

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.

Features

  • Middleware for JSON parsing using PHP Slim.
  • CRUD operations on any specified table.
  • Easy to start and deploy.

Installation

To install and set up the project, follow these steps:

  1. Clone the repository:
git clone https://github.com/asilvafx/php-sqlite-crud.git
cd php-sqlite-crud
  1. Install the dependencies:
composer install

Usage

To start the server, run:

php -S localhost:8000

The server will start on the port specified in the .env file (default is 3000).

API Endpoints

  1. Get all items from a specified table
GET /:tableName
  1. Create a new item in a specified table
POST /:tableName
  1. Update an item in a specified table
PUT /:tableName/:id
  1. Delete an item from a specified table
DELETE /:tableName/:id

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

About

Simple PHP Slim Database CRUD application using SQLite3.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages