Commit 71a8e00f authored by Taylor Otwell's avatar Taylor Otwell

Merge branch 'schedule' into develop

parents 9a0612fc 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
*/
public function handle($input, $output = null)
protected 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();
}
}
<?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);
}
}
......@@ -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);
}
}
}
......@@ -38,7 +38,7 @@ $app->singleton(
$app->singleton(
'Illuminate\Contracts\Debug\ExceptionHandler',
'Illuminate\Foundation\Debug\ExceptionHandler'
'App\Exceptions\ExceptionHandler'
);
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment