Commit 4b5e86ed authored by Nicolas Widart's avatar Nicolas Widart

New routes SP structure.

parent 76af884a
<?php namespace Modules\User\Providers;
use Illuminate\Routing\Router;
use Illuminate\Contracts\Routing\UrlGenerator;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
* The root namespace to assume when generating URLs to actions.
*
* @var string
*/
protected $rootUrlNamespace = 'Modules\User\Http\Controllers';
/**
* The controllers to scan for route annotations.
*
* @var array
*/
protected $scan = [
'Modules\User\Http\Controllers',
];
/**
* Called before routes are registered.
*
* Register any model bindings or pattern based filters.
*
* @param Router $router
* @param UrlGenerator $url
* @return void
*/
public function before(Router $router, UrlGenerator $url)
public function before(Router $router)
{
$url->setRootControllerNamespace('Modules\User\Http\Controllers');
//
}
/**
......@@ -25,14 +39,10 @@ class RouteServiceProvider extends ServiceProvider
*
* @return void
*/
public function map()
{
$this->app->booted(function()
{
$this->namespaced('Modules\User\Http\Controllers', function(Router $router)
public function map(Router $router)
{
require __DIR__ . '/../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