Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
838b20d4
Commit
838b20d4
authored
Aug 20, 2014
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use facades.
parent
2ab3d525
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
11 deletions
+9
-11
app/Providers/ErrorServiceProvider.php
+4
-2
app/Providers/LogServiceProvider.php
+2
-7
app/Providers/RouteServiceProvider.php
+3
-2
No files found.
app/Providers/ErrorServiceProvider.php
View file @
838b20d4
<?php
namespace
App\Providers
;
use
App
,
Log
;
use
Exception
;
use
Illuminate\Support\ServiceProvider
;
class
ErrorServiceProvider
extends
ServiceProvider
{
...
...
@@ -17,9 +19,9 @@ class ErrorServiceProvider extends ServiceProvider {
// exceptions. If nothing is returned, the default error view is
// shown, which includes a detailed stack trace during debug.
$this
->
app
->
error
(
function
(
\
Exception
$exception
,
$code
)
App
::
error
(
function
(
Exception
$exception
,
$code
)
{
$this
->
app
[
'log'
]
->
error
(
$exception
);
Log
::
error
(
$exception
);
});
}
...
...
app/Providers/LogServiceProvider.php
View file @
838b20d4
<?php
namespace
App\Providers
;
use
Log
;
use
Illuminate\Support\ServiceProvider
;
class
LogServiceProvider
extends
ServiceProvider
{
...
...
@@ -11,13 +12,7 @@ class LogServiceProvider extends ServiceProvider {
*/
public
function
boot
()
{
// Here we will configure the error logger setup for the application which
// is built on top of the wonderful Monolog library. By default we will
// build a basic log file setup which creates a single file for logs.
$this
->
app
[
'log'
]
->
useFiles
(
storage_path
()
.
'/logs/laravel.log'
);
Log
::
useFiles
(
storage_path
()
.
'/logs/laravel.log'
);
}
/**
...
...
app/Providers/RouteServiceProvider.php
View file @
838b20d4
<?php
namespace
App\Providers
;
use
App
;
use
Illuminate\Routing\RouteServiceProvider
as
ServiceProvider
;
class
RouteServiceProvider
extends
ServiceProvider
{
...
...
@@ -23,7 +24,7 @@ class RouteServiceProvider extends ServiceProvider {
*/
public
function
map
()
{
$this
->
app
->
booted
(
function
()
App
::
booted
(
function
()
{
// Once the application has booted, we will include the default routes
// file. This "namespace" helper will load the routes file within a
...
...
@@ -31,7 +32,7 @@ class RouteServiceProvider extends ServiceProvider {
$this
->
namespaced
(
function
()
{
require
app
(
'path'
)
.
'/Http/routes.php'
;
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