Simplify things.

This commit is contained in:
Taylor Otwell
2014-09-27 20:35:07 -05:00
parent cd37f40bba
commit 9f81d4df6e
3 changed files with 57 additions and 79 deletions

View File

@@ -17,9 +17,7 @@ class RouteServiceProvider extends ServiceProvider {
*/
public function before(Router $router, UrlGenerator $url)
{
$url->setRootControllerNamespace(
trim(config('namespaces.controllers'), '\\')
);
$url->setRootControllerNamespace('App\Http\Controllers');
}
/**
@@ -29,12 +27,12 @@ class RouteServiceProvider extends ServiceProvider {
*/
public function map()
{
// Once the application has booted, we will include the default routes
// file. This "namespace" helper will load the routes file within a
// route group which automatically sets the controller namespace.
$this->app->booted(function()
{
// Once the application has booted, we will include the default routes
// file. This "namespace" helper will load the routes file within a
// route group which automatically sets the controller namespace.
$this->namespaced(function(Router $router)
$this->namespaced('App\Http\Controllers', function(Router $router)
{
require app_path().'/Http/routes.php';
});