Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Yeray Santana Hualde
syncEnrollments
Commits
2b05ce3b
Commit
2b05ce3b
authored
Jul 11, 2016
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just use facades in service providers.
parent
ebc1be01
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
19 deletions
+14
-19
AuthServiceProvider.php
app/Providers/AuthServiceProvider.php
+3
-4
EventServiceProvider.php
app/Providers/EventServiceProvider.php
+4
-5
RouteServiceProvider.php
app/Providers/RouteServiceProvider.php
+7
-10
No files found.
app/Providers/AuthServiceProvider.php
View file @
2b05ce3b
...
...
@@ -2,7 +2,7 @@
namespace
App\Providers
;
use
Illuminate\
Contracts\Auth\Access\Gate
as
GateContract
;
use
Illuminate\
Support\Facades\Gate
;
use
Illuminate\Foundation\Support\Providers\AuthServiceProvider
as
ServiceProvider
;
class
AuthServiceProvider
extends
ServiceProvider
...
...
@@ -19,12 +19,11 @@ class AuthServiceProvider extends ServiceProvider
/**
* Register any application authentication / authorization services.
*
* @param \Illuminate\Contracts\Auth\Access\Gate $gate
* @return void
*/
public
function
boot
(
GateContract
$gate
)
public
function
boot
()
{
$this
->
registerPolicies
(
$gate
);
$this
->
registerPolicies
();
//
}
...
...
app/Providers/EventServiceProvider.php
View file @
2b05ce3b
...
...
@@ -2,7 +2,7 @@
namespace
App\Providers
;
use
Illuminate\
Contracts\Events\Dispatcher
as
DispatcherContrac
t
;
use
Illuminate\
Support\Facades\Even
t
;
use
Illuminate\Foundation\Support\Providers\EventServiceProvider
as
ServiceProvider
;
class
EventServiceProvider
extends
ServiceProvider
...
...
@@ -19,14 +19,13 @@ class EventServiceProvider extends ServiceProvider
];
/**
* Register any
other
events for your application.
* Register any events for your application.
*
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void
*/
public
function
boot
(
DispatcherContract
$events
)
public
function
boot
()
{
parent
::
boot
(
$events
);
parent
::
boot
();
//
}
...
...
app/Providers/RouteServiceProvider.php
View file @
2b05ce3b
...
...
@@ -2,7 +2,7 @@
namespace
App\Providers
;
use
Illuminate\
Routing\Router
;
use
Illuminate\
Support\Facades\Route
;
use
Illuminate\Foundation\Support\Providers\RouteServiceProvider
as
ServiceProvider
;
class
RouteServiceProvider
extends
ServiceProvider
...
...
@@ -19,25 +19,23 @@ class RouteServiceProvider extends ServiceProvider
/**
* Define your route model bindings, pattern filters, etc.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public
function
boot
(
Router
$router
)
public
function
boot
()
{
//
parent
::
boot
(
$router
);
parent
::
boot
();
}
/**
* Define the routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public
function
map
(
Router
$router
)
public
function
map
()
{
$this
->
mapWebRoutes
(
$router
);
$this
->
mapWebRoutes
();
//
}
...
...
@@ -47,12 +45,11 @@ class RouteServiceProvider extends ServiceProvider
*
* These routes all receive session state, CSRF protection, etc.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
protected
function
mapWebRoutes
(
Router
$router
)
protected
function
mapWebRoutes
()
{
$router
->
group
([
Route
::
group
([
'namespace'
=>
$this
->
namespace
,
'middleware'
=>
'web'
,
],
function
(
$router
)
{
require
app_path
(
'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