/slim-api

Sample of how to create an API using the Slim Micro Framework in PHP 8

Primary LanguagePHP

Slim 4 API for Last Mile Service

Requirements

  • PHP 7.4+ or 8.0+
  • MySQL 5.7+ or MariaDB

Recommended

  • Apache with mod_rewrite
  • Apache Ant to build deployment artifacts

Features

This project is based on best practices and industry standards:

  • HTTP message interfaces (PSR-7)
  • HTTP Server Request Handlers, Middleware (PSR-15)
  • HTTP factories (PSR-17)
  • HTTP router and dispatcher (Slim)
  • Dependency injection container (PSR-11)
  • Modern coding style (PSR-1, PSR-12)
  • PHPDoc standard (PSR-5, PSR-19)
  • Autoloading (PSR-4)
  • Logging (PSR-3)
  • Standard PHP package skeleton
  • Single action controllers (ADR)
  • Input validation
  • SQL Query Builder
  • Database migrations
  • Immutable date and time (Chronos)
  • Unit- and integration tests (PHPUnit)
  • Console Commands
  • Build and deployment scripts
  • Docker container with Xdebug support

Usage

You can clone this project to modify it as you wish to create awesome API's and web applications.