Have webmentions sent automatically

This commit is contained in:
Jonny Barnes 2016-06-23 14:27:00 +01:00
parent 44060da577
commit e31364e787
7 changed files with 49 additions and 11 deletions

View file

@ -6,6 +6,7 @@ use Exception;
use Illuminate\Validation\ValidationException;
use Illuminate\Session\TokenMismatchException;
use Illuminate\Auth\Access\AuthorizationException;
use Symfony\Component\Debug\Exception\FlattenException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
@ -78,10 +79,11 @@ class Handler extends ExceptionHandler
});
$whoops->pushHandler($handler);
$flattened = FlattenException::create($exc);
return new \Illuminate\Http\Response(
$whoops->handleException($exc),
$exc->getStatusCode(),
$exc->getHeaders()
$flattened->getStatusCode(),
$flattened->getHeaders()
);
}
}