GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rkshaw/php-api-sample: A simple sample to demonstrate PHP based API with swagger documentation support

BranchesTags
Open more actions menu

Latest commit

 

History

18 Commits
18 Commits

Folders and files

NameName
Last commit message
Last commit date
api
api
 
 
help
help
 
 
swagger-ui
swagger-ui
 
 
.gitignore
.gitignore
 
 
.htaccess
.htaccess
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 
database.sql
database.sql
 
 
index.html
index.html
 
 
index.php
index.php
 
 

Repository files navigation

PHP API SAMPLE Demo

Live Demo

  • https://theutility.in/php-api/help/

Features:

  • PSR autoloading
  • Exception middleware
  • PDO Database service (configure DB in api/DataLayer/Database.php)
  • Product CRUD (id,name,size,is_available)
  • Custom action routing: /api/v1/{controller}/{customMethod}
  • Swagger annotations (swagger.php + app/Docs/*.php)

Setup:

  1. Unzip into your htdocs (e.g., D:/xampp/htdocs/php-api-psr4)
  2. Run: composer install
  3. Create database and table (see app/Config/sql.sql)
  4. Adjust DB credentials in api/DataLayer/Database.php
  5. Start Apache or run: php -S localhost:8000 -t public
  6. Access API via: http://localhost/php-api/api/v1/products

About

A simple sample to demonstrate PHP based API with swagger documentation support

theutility.in/php-api/help/

Topics

phpapiphpswagger

Resources

Readme
GPL-3.0 license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.