Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

oladesoftware/router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Router

Latest Version License

A simple lightweight router implementation for handling HTTP routes written in PHP. This class allows you to define routes, group them, add middleware, and handle requests based on defined routes.

Table of Contents

Features

  • Singleton Pattern: Ensures a single instance of the router.
  • Route Definition: Add individual routes with HTTP methods, URI paths, and targets (controllers or closures).
  • Route Grouping: Group multiple routes under a common base path.
  • Middleware Support: Assign middleware to routes for pre-processing.
  • Named Routes: Name your routes for easier route generation.
  • Dynamic Route Matching: Match incoming requests to defined routes and extract parameters.
  • Route Execution: Execute the target action of matched routes.

Installation

  • Via Composer (Recommended):
composer require oladesoftware/router
  • Manual Installation:

Download the router class file and include it in your project.

Usage

For detailed usage instructions, please refer to the Usage Documentation.

License

This project is licensed under the MIT License. See the License file for details.

Contributing

Contributions are welcome! Feel free to submit issues or pull requests.

Support

For support, please open an issue on the GitHub repository.

Contributors

Author

About

A lightweight router written in PHP

Resources

License

Stars

Watchers

Forks

Contributors

Languages