mirror of
https://github.com/filp/whoops.git
synced 2026-09-15 20:26:44 +00:00
CS Fix Illuminate Provider
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
<?php namespace Damnit\Provider\Illuminate;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
<?php
|
||||
/**
|
||||
* Damnit - php errors for cool kids
|
||||
* @author @schickling <https://github.com/schickling>
|
||||
*/
|
||||
|
||||
namespace Damnit\Provider\Illuminate;
|
||||
use Damnit\Handler\PrettyPageHandler;
|
||||
use Damnit\Run;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
/**
|
||||
* Provides support for Illuminate (Laravel 4)
|
||||
@@ -12,29 +16,23 @@ class DamnitServiceProvider extends ServiceProvider {
|
||||
|
||||
/**
|
||||
* Register the service provider for damnit to laravel
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$app = $this->app;
|
||||
|
||||
$this->app['damnit.handler'] = $this->app->share(function($app)
|
||||
{
|
||||
$app['damnit.handler'] = $app->share(function($app) {
|
||||
return new PrettyPageHandler;
|
||||
});
|
||||
|
||||
$this->app['damnit'] = $this->app->share(function($app)
|
||||
{
|
||||
$app['damnit'] = $app->share(function($app) {
|
||||
$run = new Run;
|
||||
|
||||
return $run->pushHandler($app['damnit.handler']);
|
||||
});
|
||||
|
||||
$this->app->error(function($e) use ($app)
|
||||
{
|
||||
$app->error(function($e) use ($app) {
|
||||
$app['damnit']->handleException($e);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user