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
4e429212
Commit
4e429212
authored
Oct 17, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Swapping to the new routes
parent
0d1abc87
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
14 deletions
+55
-14
routes.php
Modules/Dashboard/Http/routes.php
+3
-3
RouteServiceProvider.php
Modules/Dashboard/Providers/RouteServiceProvider.php
+48
-0
module.json
Modules/Dashboard/module.json
+4
-1
start.php
Modules/Dashboard/start.php
+0
-10
No files found.
Modules/Dashboard/Http/routes.php
View file @
4e429212
<?php
<?php
Route
::
group
([
'prefix'
=>
LaravelLocalization
::
setLocale
(),
'before'
=>
'LaravelLocalizationRedirectFilter|auth.admin'
],
function
(
)
$router
->
group
([
'prefix'
=>
LaravelLocalization
::
setLocale
(),
'before'
=>
'LaravelLocalizationRedirectFilter|auth.admin'
],
function
(
$router
)
{
{
Route
::
group
([
'prefix'
=>
Config
::
get
(
'core::core.admin-prefix'
),
'namespace'
=>
'Modules\Dashboard\Http\Controllers'
],
function
(
)
$router
->
group
([
'prefix'
=>
Config
::
get
(
'core::core.admin-prefix'
),
'namespace'
=>
'Modules\Dashboard\Http\Controllers'
],
function
(
$router
)
{
{
Route
::
get
(
'/'
,
[
'as'
=>
'dashboard.index'
,
'uses'
=>
'Admin\DashboardController@index'
]);
$router
->
get
(
'/'
,
[
'as'
=>
'dashboard.index'
,
'uses'
=>
'Admin\DashboardController@index'
]);
});
});
});
});
Modules/Dashboard/Providers/RouteServiceProvider.php
0 → 100644
View file @
4e429212
<?php
namespace
Modules\Dashboard\Providers
;
use
Illuminate\Routing\Router
;
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\Dashboard\Http\Controllers'
;
/**
* The controllers to scan for route annotations.
*
* @var array
*/
protected
$scan
=
[
'Modules\Dashboard\Http\Controllers'
,
];
/**
* Called before routes are registered.
*
* Register any model bindings or pattern based filters.
*
* @param Router $router
* @return void
*/
public
function
before
(
Router
$router
)
{
//
}
/**
* Define the routes for the application.
*
* @return void
*/
public
function
map
(
Router
$router
)
{
require
__DIR__
.
'/../Http/routes.php'
;
}
}
Modules/Dashboard/module.json
View file @
4e429212
...
@@ -3,5 +3,8 @@
...
@@ -3,5 +3,8 @@
"alias"
:
"dashboard"
,
"alias"
:
"dashboard"
,
"description"
:
"The module responsible for the admin dashboard page."
,
"description"
:
"The module responsible for the admin dashboard page."
,
"keywords"
:
[],
"keywords"
:
[],
"active"
:
1
"active"
:
1
,
"providers"
:
[
"Modules
\\
Dashboard
\\
Providers
\\
RouteServiceProvider"
]
}
}
\ No newline at end of file
Modules/Dashboard/start.php
View file @
4e429212
...
@@ -16,15 +16,5 @@ Lang::addNamespace('dashboard', __DIR__ . '/Resources/lang/');
...
@@ -16,15 +16,5 @@ Lang::addNamespace('dashboard', __DIR__ . '/Resources/lang/');
Config
::
addNamespace
(
'dashboard'
,
__DIR__
.
'/Config/'
);
Config
::
addNamespace
(
'dashboard'
,
__DIR__
.
'/Config/'
);
/*
|--------------------------------------------------------------------------
| Require The Routes file.
|--------------------------------------------------------------------------
|
| Next, this module will load filters and routes file.
|
*/
require
__DIR__
.
'/Http/routes.php'
;
require
__DIR__
.
'/composers.php'
;
require
__DIR__
.
'/composers.php'
;
\ No newline at end of file
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