Skip to content

Commit e3e7cc4

Browse files
committed
Set the root controller namespace.
1 parent ca2f022 commit e3e7cc4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/Providers/RouteServiceProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php namespace App\Providers;
22

33
use Illuminate\Routing\Router;
4+
use Illuminate\Contracts\Routing\UrlGenerator;
45
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
56

67
class RouteServiceProvider extends ServiceProvider {
@@ -22,11 +23,12 @@ class RouteServiceProvider extends ServiceProvider {
2223
* Register any model bindings or pattern based filters.
2324
*
2425
* @param \Illuminate\Routing\Router $router
26+
* @param \Illuminate\Contracts\Routing\UrlGenerator $url
2527
* @return void
2628
*/
27-
public function before(Router $router)
29+
public function before(Router $router, UrlGenerator $url)
2830
{
29-
//
31+
$url->setRootControllerNamespace('App\Http\Controllers');
3032
}
3133

3234
/**

0 commit comments

Comments
 (0)