2017 © Pedro Peláez
 

library viaduct

Viaduct is a very simple php router, hope to be able to help the php-framework beginners to understand the principle of router better

image

bookfrank/viaduct

Viaduct is a very simple php router, hope to be able to help the php-framework beginners to understand the principle of router better

  • Sunday, December 24, 2017
  • by bookfrank
  • Repository
  • 1 Watchers
  • 1 Stars
  • 24 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Viaduct 高架桥

Viaduct is a simple but quick PHP router., (*1)

Viaduct is a very simple php router, hope to be able to help the php-framework beginners to understand the principle of router better., (*2)

Features

  • Simple
  • One-file (only 6 functions)
  • Laravel-like routes

Installation

  1. You can directly run composer require to install in your project.
composer require bookfrank/viaduct
  1. Also you can get the viaduct simply require it in your composer.json file.
"bookfrank/viaduct": "dev-master"

You will then need to run composer install to download it and have the autoloader updated., (*3)

Usage

First, create the routes.php file., (*4)

<?php
use \Bookfrank\Viaduct\Router;

Router::get('hello', function(){
    echo "Hello viaduct";
});

Router::get('profile/{uid}', function($uid){
    echo "Present userid is ".$uid;
});

Router::get('blog/{id}', "\Foo\Bar\FooController@bar");

Router::dispatch();
<?php
class FooController{
    public function bar($id){
        echo "id is ".$id;
    }
}

Contact me

Author: Frank 李扬, (*5)

Email: bookfrank@foxmail.com, (*6)

The Versions

24/12 2017

dev-master

9999999-dev

Viaduct is a very simple php router, hope to be able to help the php-framework beginners to understand the principle of router better

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

23/02 2017

v1.1.0

1.1.0.0

Viaduct is a very simple php router, hope to be able to help the php-framework beginners to understand the principle of router better

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

16/02 2017

v2.0.0

2.0.0.0

Viaduct is a very simple php router, hope to be able to help the php-framework beginners to understand the principle of router better

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

09/02 2017

v1.0.0

1.0.0.0

Viaduct is a very simple php router, hope to be able to help the php-framework beginners to understand the principle of router better

  Sources   Download

MIT

The Requires

  • php >=5.5.9