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
a7e6a89c
Commit
a7e6a89c
authored
Nov 18, 2014
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add scheduled commands.
parent
e3e7cc49
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
38 deletions
+39
-38
app/Console/Kernel.php
+7
-17
app/Exceptions/Handler.php
+31
-0
app/Http/Kernel.php
+0
-20
bootstrap/app.php
+1
-1
No files found.
app/Console/Kernel.php
View file @
a7e6a89c
<?php
namespace
App\Console
;
use
Exception
;
use
Illuminate\Console\Scheduling\Schedule
;
use
Illuminate\Foundation\Console\Kernel
as
ConsoleKernel
;
class
Kernel
extends
ConsoleKernel
{
...
...
@@ -15,26 +16,15 @@ class Kernel extends ConsoleKernel {
];
/**
*
Run the console application
.
*
Define the application's command schedule
.
*
* @param \Symfony\Component\Console\Input\InputInterface $input
* @param \Symfony\Component\Console\Output\OutputInterface $output
* @return int
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
p
ublic
function
handle
(
$input
,
$output
=
null
)
p
rotected
function
schedule
(
Schedule
$schedule
)
{
try
{
return
parent
::
handle
(
$input
,
$output
);
}
catch
(
Exception
$e
)
{
$this
->
reportException
(
$e
);
$this
->
renderException
(
$output
,
$e
);
return
1
;
}
$schedule
->
artisan
(
'foo'
)
->
hourly
();
}
}
app/Exceptions/Handler.php
0 → 100644
View file @
a7e6a89c
<?php
namespace
App\Exceptions
;
use
Exception
;
use
Illuminate\Foundation\Exceptions\Handler
as
ExceptionHandler
;
class
Handler
extends
ExceptionHandler
{
/**
* Report or log an exception.
*
* @param \Exception $e
* @return void
*/
public
function
report
(
Exception
$e
)
{
return
parent
::
report
(
$e
);
}
/**
* Render an exception into a response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
*/
public
function
render
(
$request
,
Exception
$e
)
{
return
parent
::
render
(
$request
,
$e
);
}
}
app/Http/Kernel.php
View file @
a7e6a89c
...
...
@@ -19,24 +19,4 @@ class Kernel extends HttpKernel {
'Illuminate\Foundation\Http\Middleware\VerifyCsrfToken'
,
];
/**
* Handle an incoming HTTP request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public
function
handle
(
$request
)
{
try
{
return
parent
::
handle
(
$request
);
}
catch
(
Exception
$e
)
{
$this
->
reportException
(
$e
);
return
$this
->
renderException
(
$request
,
$e
);
}
}
}
bootstrap/app.php
View file @
a7e6a89c
...
...
@@ -38,7 +38,7 @@ $app->singleton(
$app
->
singleton
(
'Illuminate\Contracts\Debug\ExceptionHandler'
,
'
Illuminate\Foundation\Debug
\ExceptionHandler'
'
App\Exceptions
\ExceptionHandler'
);
/*
...
...
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