Commit 692c9667 authored by Taylor Otwell's avatar Taylor Otwell

Let router be inherited by route script.

parent 076d86bf
...@@ -11,4 +11,4 @@ ...@@ -11,4 +11,4 @@
| |
*/ */
Route::get('/', 'HomeController@index'); $router->get('/', 'HomeController@index');
<?php namespace App\Providers; <?php namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Contracts\Routing\UrlGenerator; use Illuminate\Contracts\Routing\UrlGenerator;
use Illuminate\Routing\RouteServiceProvider as ServiceProvider; use Illuminate\Routing\RouteServiceProvider as ServiceProvider;
...@@ -32,7 +33,7 @@ class RouteServiceProvider extends ServiceProvider { ...@@ -32,7 +33,7 @@ class RouteServiceProvider extends ServiceProvider {
// Once the application has booted, we will include the default routes // Once the application has booted, we will include the default routes
// file. This "namespace" helper will load the routes file within a // file. This "namespace" helper will load the routes file within a
// route group which automatically sets the controller namespace. // route group which automatically sets the controller namespace.
$this->namespaced(function() $this->namespaced(function(Router $router)
{ {
require app_path().'/Http/routes.php'; require app_path().'/Http/routes.php';
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment