PHPackages                             rockberpro/rosa-router - 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. [API Development](/categories/api)
4. /
5. rockberpro/rosa-router

ActiveLibrary[API Development](/categories/api)

rockberpro/rosa-router
======================

Smart REST router for PHP

v2.4.0(3mo ago)078MITPHPPHP &gt;=8.0

Since Oct 8Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/rockberpro/rosa-router)[ Packagist](https://packagist.org/packages/rockberpro/rosa-router)[ RSS](/packages/rockberpro-rosa-router/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (112)Used By (0)

ROSA-Router: Smart REST router for PHP
======================================

[](#rosa-router-smart-rest-router-for-php)

Introduction
------------

[](#introduction)

**ROSA-Router** is a lightweight and efficient REST API engine built using PHP. It is designed to handle HTTP requests and route them to the appropriate controllers or functions based on the defined API endpoints. With a focus on simplicity and performance, ROSA-Router enables developers to quickly create and deploy RESTful web services.

---

Key Features
------------

[](#key-features)

- **Easy Routing System**: Define routes for your REST API with simple configurations.
- **Request Method Handling**: Supports various HTTP methods such as `GET`, `POST`, `PUT`, `PATCH` and `DELETE`
- **Error Handling**: Built-in error handling mechanisms to gracefully manage exceptions and invalid requests.
- **Lightweight and Fast**: Optimized for performance, making it ideal for projects that require fast and efficient REST APIs.

---

How It Works
------------

[](#how-it-works)

ROSA-Router listens for HTTP requests and maps them to the correct route handler based on the request's method and URI. It supports both static and dynamic routes and is fully customizable to fit different project needs.

Setup example
-------------

[](#setup-example)

- index.php

```
