This repository has been archived by the owner. It is now read-only.
[ARCHIVED] Example starter project for contributte/api-router
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
log
temp
www
.gitignore
.htaccess
LICENSE
composer.json
composer.lock
readme.md

readme.md

Latest Stable Version License Total Downloads Gitter

ApiRouter Example Project

This repository is meant as a starter project for ublaboo/api-router.

Requirements

PHP 7.1 or higher.

ublaboo/api-router-project usage

composer create-project ublaboo/api-router-project

Long Story Short

  • Using ublaboo/api-router for routing
  • Implementing IPresenter in endpoints (App\Controllers\LoginController) instead of extending UI\Presenter
  • Extending ApiResponse from Nette JsonResponse, just to make it more simple to add more custom headers and so on
  • LoginController and ErrorController is using ApiResponseFormatter for formatting succes message, payload data or and exception