babanesma / laravel5-routing
Laravel5 routing package
dev-master
2015-11-21 23:07 UTC
Requires
- php: >=5.5.9
- laravel/framework: 5.1.*
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-11-23 19:48:27 UTC
README
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