babanesma / laravel5-routing by babanesma

Laravel5 routing package
14
0
2
Package Data
Maintainer Username: babanesma
Maintainer Contact: adham.sa3d@gmail.com (Adham Saad)
Package Create Date: 2015-11-21
Package Last Update: 2015-11-21
Language: PHP
License: MIT
Last Refreshed: 2024-11-26 15:05:24
Package Statistics
Total Downloads: 14
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

laravel5-routing

Simple package to provide some changes in laravel 5 routing

Installation

1- Add this line to composer.json and run composer update

"babanesma/laravel5-routing": "dev-master"

2- Add this line to bootstrap\app.php

$app->singleton('router', Babanesma\Routing\Router::class);

3- Add new router rule

Route::group(["vars" => ['foo' => 'bar']], function() use ($router) {
    $router->get('baz', function () {
        return 'testing vars';
    });
});

4- visit your site at /baz?foo=bar , you should see testing vars