PHPackages                             berxam/ranko - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. berxam/ranko

ActiveProject[Framework](/categories/framework)

berxam/ranko
============

Minimal framework for simple API creation.

1.2(5y ago)016Apache-2.0PHP

Since Dec 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/berxam/ranko)[ Packagist](https://packagist.org/packages/berxam/ranko)[ RSS](/packages/berxam-ranko/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

ranko • micro framework for web apps
====================================

[](#ranko--micro-framework-for-web-apps)

Minimal framework for creating RESTful APIs or simple web apps with PHP.

Installation
------------

[](#installation)

via [Composer](https://getcomposer.org)

```
composer require berxam/ranko

```

Features
--------

[](#features)

Ranko is basically just a router to which you can mount routes with their corresponding callables, a `Request` and `Response` which get passed to each forementioned callable.

- bind controller functions to HTTP methods and URLs or URL templates like `/users/:id`
- access request body and headers easily through `Request`
- respond to client with `Response` methods like `sendJSON(mixed $response)` and `render(string $view, mixed ...$params)`

Usage
-----

[](#usage)

The best way to understand how this "framework" works is to just skim through the files in this repo. This whole project is less than 500 lines.

### Hello world

[](#hello-world)

`index.php`:

```
