All Projects → izniburak → Php Router

izniburak / Php Router

Licence: mit
simple and flexible Router class for PHP. with Controllers and Middlewares support.

Projects that are alternatives of or similar to Php Router

Router
🛣 Simple Navigation for iOS
Stars: ✭ 438 (+294.59%)
Mutual labels:  router, routing
Routing
The Routing component maps an HTTP request to a set of configuration variables.
Stars: ✭ 7,080 (+6278.38%)
Mutual labels:  router, routing
Micro Router
🚉 A tiny and functional router for Zeit's Micro
Stars: ✭ 621 (+459.46%)
Mutual labels:  router, routing
Cortex
Routing system for WordPress
Stars: ✭ 300 (+170.27%)
Mutual labels:  router, routing
Corenavigation
📱📲 Navigate between view controllers with ease. 💫 🔜 More stable version (written in Swift 5) coming soon.
Stars: ✭ 69 (-37.84%)
Mutual labels:  router, routing
Freerouting
Advanced PCB autorouter (finally, no Java installation required)
Stars: ✭ 307 (+176.58%)
Mutual labels:  router, routing
Bidi
Bidirectional URI routing
Stars: ✭ 941 (+747.75%)
Mutual labels:  router, routing
Ffrouter
Powerful and easy-to-use URL routing library in iOS that supports URL Rewrite(强大、易用、支持 URL Rewrite的 iOS 路由库)
Stars: ✭ 263 (+136.94%)
Mutual labels:  router, routing
Restify Router
A router interface for restify that lets you aggregate route definitions and apply to a restify server
Stars: ✭ 45 (-59.46%)
Mutual labels:  router, routing
Url Mapper
Take a URL and map to functions, parsing params
Stars: ✭ 39 (-64.86%)
Mutual labels:  router, routing
Fluro
Fluro is a Flutter routing library that adds flexible routing options like wildcards, named parameters and clear route definitions.
Stars: ✭ 3,372 (+2937.84%)
Mutual labels:  router, routing
Literoute
LiteRoute is easy transition for your app. Written on Swift 4
Stars: ✭ 90 (-18.92%)
Mutual labels:  router, routing
Abstract State Router
Like ui-router, but without all the Angular. The best way to structure a single-page webapp.
Stars: ✭ 288 (+159.46%)
Mutual labels:  router, routing
Graphpath
Graphpath generates an ASCII network diagram from the route table of a Unix/Linux
Stars: ✭ 321 (+189.19%)
Mutual labels:  router, routing
Simple Php Router
Simple, fast and yet powerful PHP router that is easy to get integrated and in any project. Heavily inspired by the way Laravel handles routing, with both simplicity and expand-ability in mind.
Stars: ✭ 279 (+151.35%)
Mutual labels:  router, routing
Storeon Async Router
Asynchronous router for Storeon. It provides possibility for prefetch the data, lazy load, navigation cancellation, and routes modification on the fly.
Stars: ✭ 22 (-80.18%)
Mutual labels:  router, routing
yew-router
Router extension to yew
Stars: ✭ 27 (-75.68%)
Mutual labels:  router, routing
gatsby-plugin-dynamic-routes
Creating dynamic routes based on your environment and/or renaming existing routes
Stars: ✭ 14 (-87.39%)
Mutual labels:  router, routing
React Router Component
Declarative router component for React.
Stars: ✭ 879 (+691.89%)
Mutual labels:  router, routing
Lit Element Router
A LitElement Router (1278 bytes gzip)
Stars: ✭ 85 (-23.42%)
Mutual labels:  router, routing

Router

  _____  _    _ _____             _____             _            
 |  __ \| |  | |  __ \           |  __ \           | |           
 | |__) | |__| | |__) |  ______  | |__) |___  _   _| |_ ___ _ __
 |  ___/|  __  |  ___/  |______| |  _  // _ \| | | | __/ _ \ '__|
 | |    | |  | | |               | | \ \ (_) | |_| | ||  __/ |   
 |_|    |_|  |_|_|               |_|  \_\___/ \__,_|\__\___|_|   

simple Router class for PHP. with the support of Controllers and Middlewares.

Total Downloads Latest Stable Version Latest Unstable Version License

Features

  • Supports GET, POST, PUT, DELETE, OPTIONS, PATCH, HEAD, AJAX and ANY request methods
  • Easy access and manage Request and Response via symfony/http-foundation package.
  • Controllers support (Example: [email protected])
  • Before and after Route Middlewares support
  • Static Route Patterns
  • Dynamic Route Patterns
  • Easy-to-use patterns
  • Adding a new pattern supports. (with RegExp)
  • Namespaces supports.
  • Group Routing
  • Custom 404 handling
  • Debug mode (Error message open/close)

Install

composer.json file:

{
    "require": {
        "izniburak/router": "^2.0"
    }
}

after run the install command.

$ composer install

OR run the following command directly.

$ composer require izniburak/router

Example Usage

require 'vendor/autoload.php';

use Buki\Router\Router;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;

$router = new Router;

// For basic GET URI
$router->get('/', function(Request $request, Response $response) {
    $response->setContent('Hello World');
    return $response;

    # OR
    # return 'Hello World!';
});

// For basic GET URI by using a Controller class.
$router->get('/test', '[email protected]');

// For auto discovering all methods and URIs
$router->controller('/users', 'UserController');

$router->run();

Docs

Documentation page: Buki\Router Docs

Changelogs: Buki\Router Changelogs

Support

izniburak's homepage

izniburak's twitter

Licence

MIT Licence

Contributing

  1. Fork it ( https://github.com/izniburak/php-router/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • izniburak İzni Burak Demirtaş - creator, maintainer
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].