Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
4b5e86ed
Commit
4b5e86ed
authored
Oct 17, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New routes SP structure.
parent
76af884a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
29 deletions
+39
-29
RouteServiceProvider.php
Modules/User/Providers/RouteServiceProvider.php
+39
-29
No files found.
Modules/User/Providers/RouteServiceProvider.php
View file @
4b5e86ed
<?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'
;
});
});
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment