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
e47e7a0d
Commit
e47e7a0d
authored
Sep 11, 2016
by
Pralhad Shrestha
Committed by
Nicolas Widart
Sep 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated the routes to be overrided if required else the normal way works (#240)
parent
12ae3de2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
RouteServiceProvider.php
app/Providers/RouteServiceProvider.php
+6
-1
app.php
config/app.php
+2
-1
No files found.
app/Providers/RouteServiceProvider.php
View file @
e47e7a0d
...
@@ -4,6 +4,7 @@ namespace App\Providers;
...
@@ -4,6 +4,7 @@ namespace App\Providers;
use
Illuminate\Support\Facades\Route
;
use
Illuminate\Support\Facades\Route
;
use
Illuminate\Foundation\Support\Providers\RouteServiceProvider
as
ServiceProvider
;
use
Illuminate\Foundation\Support\Providers\RouteServiceProvider
as
ServiceProvider
;
use
Mcamara\LaravelLocalization\Facades\LaravelLocalization
;
class
RouteServiceProvider
extends
ServiceProvider
class
RouteServiceProvider
extends
ServiceProvider
{
{
...
@@ -23,6 +24,9 @@ class RouteServiceProvider extends ServiceProvider
...
@@ -23,6 +24,9 @@ class RouteServiceProvider extends ServiceProvider
public
function
boot
()
public
function
boot
()
{
{
parent
::
boot
();
parent
::
boot
();
$this
->
app
->
booted
(
function
()
{
$this
->
map
();
});
}
}
/**
/**
* Define the routes for the application.
* Define the routes for the application.
...
@@ -44,8 +48,9 @@ class RouteServiceProvider extends ServiceProvider
...
@@ -44,8 +48,9 @@ class RouteServiceProvider extends ServiceProvider
protected
function
mapWebRoutes
()
protected
function
mapWebRoutes
()
{
{
Route
::
group
([
Route
::
group
([
'middleware'
=>
'web'
,
'middleware'
=>
[
'localizationRedirect'
,
'web'
]
,
'namespace'
=>
$this
->
namespace
,
'namespace'
=>
$this
->
namespace
,
'prefix'
=>
LaravelLocalization
::
setLocale
(),
],
function
(
$router
)
{
],
function
(
$router
)
{
require
base_path
(
'routes/web.php'
);
require
base_path
(
'routes/web.php'
);
});
});
...
...
config/app.php
View file @
e47e7a0d
...
@@ -175,9 +175,10 @@ return [
...
@@ -175,9 +175,10 @@ return [
App\Providers\AppServiceProvider
::
class
,
App\Providers\AppServiceProvider
::
class
,
App\Providers\AuthServiceProvider
::
class
,
App\Providers\AuthServiceProvider
::
class
,
App\Providers\EventServiceProvider
::
class
,
App\Providers\EventServiceProvider
::
class
,
App\Providers\RouteServiceProvider
::
class
,
Modules\Core\Providers\AsgardServiceProvider
::
class
,
Modules\Core\Providers\AsgardServiceProvider
::
class
,
App\Providers\RouteServiceProvider
::
class
,
],
],
/*
/*
...
...
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