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
5e88422a
Commit
5e88422a
authored
Oct 17, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
e3d775c7
'
* commit '
e3d775c7
': Squashed 'Modules/User/' changes from 387e439..6206740
parents
450d1ce0
e3d775c7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
25 deletions
+55
-25
routes.php
Modules/User/Http/routes.php
+15
-15
RouteServiceProvider.php
Modules/User/Providers/RouteServiceProvider.php
+38
-0
module.json
Modules/User/module.json
+2
-1
start.php
Modules/User/start.php
+0
-9
No files found.
Modules/User/Http/routes.php
View file @
5e88422a
<?php
Route
::
group
([
'prefix'
=>
LaravelLocalization
::
setLocale
(),
'before'
=>
'LaravelLocalizationRedirectFilter|auth.admin|permissions'
],
function
(
)
$router
->
group
([
'prefix'
=>
LaravelLocalization
::
setLocale
(),
'before'
=>
'LaravelLocalizationRedirectFilter|auth.admin|permissions'
],
function
(
$router
)
{
Route
::
group
([
'prefix'
=>
Config
::
get
(
'core::core.admin-prefix'
),
'namespace'
=>
'Modules\User\Http\Controllers'
],
function
(
)
$router
->
group
([
'prefix'
=>
Config
::
get
(
'core::core.admin-prefix'
)],
function
(
$router
)
{
Route
::
resource
(
'users'
,
'Admin\UserController'
,
[
'except'
=>
[
'show'
],
'names'
=>
[
$router
->
resource
(
'users'
,
'Admin\UserController'
,
[
'except'
=>
[
'show'
],
'names'
=>
[
'index'
=>
'dashboard.user.index'
,
'create'
=>
'dashboard.user.create'
,
'store'
=>
'dashboard.user.store'
,
...
...
@@ -12,7 +12,7 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'Laravel
'update'
=>
'dashboard.user.update'
,
'destroy'
=>
'dashboard.user.destroy'
,
]]);
Route
::
resource
(
'roles'
,
'Admin\RolesController'
,
[
'except'
=>
[
'show'
],
'names'
=>
[
$router
->
resource
(
'roles'
,
'Admin\RolesController'
,
[
'except'
=>
[
'show'
],
'names'
=>
[
'index'
=>
'dashboard.role.index'
,
'create'
=>
'dashboard.role.create'
,
'store'
=>
'dashboard.role.store'
,
...
...
@@ -23,21 +23,21 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'Laravel
});
});
Route
::
group
([
'prefix'
=>
'auth'
,
'namespace'
=>
'Modules\User\Http\Controllers'
],
function
(
)
$router
->
group
([
'prefix'
=>
'auth'
],
function
(
$router
)
{
# Login
Route
::
get
(
'login'
,
[
'before'
=>
'auth.guest'
,
'as'
=>
'login'
,
'uses'
=>
'AuthController@getLogin'
]);
Route
::
post
(
'login'
,
array
(
'as'
=>
'login.post'
,
'uses'
=>
'AuthController@postLogin'
));
$router
->
get
(
'login'
,
[
'before'
=>
'auth.guest'
,
'as'
=>
'login'
,
'uses'
=>
'AuthController@getLogin'
]);
$router
->
post
(
'login'
,
array
(
'as'
=>
'login.post'
,
'uses'
=>
'AuthController@postLogin'
));
# Register
Route
::
get
(
'register'
,
[
'before'
=>
'auth.guest'
,
'as'
=>
'register'
,
'uses'
=>
'AuthController@getRegister'
]);
Route
::
post
(
'register'
,
array
(
'as'
=>
'register.post'
,
'uses'
=>
'AuthController@postRegister'
));
$router
->
get
(
'register'
,
[
'before'
=>
'auth.guest'
,
'as'
=>
'register'
,
'uses'
=>
'AuthController@getRegister'
]);
$router
->
post
(
'register'
,
array
(
'as'
=>
'register.post'
,
'uses'
=>
'AuthController@postRegister'
));
# Account Activation
Route
::
get
(
'activate/{userId}/{activationCode}'
,
'AuthController@getActivate'
);
$router
->
get
(
'activate/{userId}/{activationCode}'
,
'AuthController@getActivate'
);
# Reset password
Route
::
get
(
'reset'
,
[
'as'
=>
'reset'
,
'uses'
=>
'AuthController@getReset'
]);
Route
::
post
(
'reset'
,
[
'as'
=>
'reset.post'
,
'uses'
=>
'AuthController@postReset'
]);
Route
::
get
(
'reset/{id}/{code}'
,
[
'as'
=>
'reset.complete'
,
'uses'
=>
'AuthController@getResetComplete'
]);
Route
::
post
(
'reset/{id}/{code}'
,
[
'as'
=>
'reset.complete.post'
,
'uses'
=>
'AuthController@postResetComplete'
]);
$router
->
get
(
'reset'
,
[
'as'
=>
'reset'
,
'uses'
=>
'AuthController@getReset'
]);
$router
->
post
(
'reset'
,
[
'as'
=>
'reset.post'
,
'uses'
=>
'AuthController@postReset'
]);
$router
->
get
(
'reset/{id}/{code}'
,
[
'as'
=>
'reset.complete'
,
'uses'
=>
'AuthController@getResetComplete'
]);
$router
->
post
(
'reset/{id}/{code}'
,
[
'as'
=>
'reset.complete.post'
,
'uses'
=>
'AuthController@postResetComplete'
]);
# Logout
Route
::
get
(
'logout'
,
array
(
'as'
=>
'logout'
,
'uses'
=>
'AuthController@getLogout'
));
$router
->
get
(
'logout'
,
array
(
'as'
=>
'logout'
,
'uses'
=>
'AuthController@getLogout'
));
});
Modules/User/Providers/RouteServiceProvider.php
0 → 100644
View file @
5e88422a
<?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
{
/**
* 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
)
{
$url
->
setRootControllerNamespace
(
'Modules\User\Http\Controllers'
);
}
/**
* Define the routes for the application.
*
* @return void
*/
public
function
map
()
{
$this
->
app
->
booted
(
function
()
{
$this
->
namespaced
(
'Modules\User\Http\Controllers'
,
function
(
Router
$router
)
{
require
__DIR__
.
'/../Http/routes.php'
;
});
});
}
}
Modules/User/module.json
View file @
5e88422a
...
...
@@ -5,6 +5,7 @@
"keywords"
:
[],
"active"
:
1
,
"providers"
:
[
"Modules
\\
User
\\
Providers
\\
UserServiceProvider"
"Modules
\\
User
\\
Providers
\\
UserServiceProvider"
,
"Modules
\\
User
\\
Providers
\\
RouteServiceProvider"
]
}
\ No newline at end of file
Modules/User/start.php
View file @
5e88422a
...
...
@@ -16,16 +16,7 @@ Lang::addNamespace('user', __DIR__ . '/Resources/lang/');
Config
::
addNamespace
(
'user'
,
__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__
.
'/helpers.php'
;
require
__DIR__
.
'/listeners.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