Account next invoice, and authorisations

This commit is contained in:
Deon George
2019-07-04 14:55:05 +10:00
parent 59a8ef2476
commit 21ea60c4f9
26 changed files with 532 additions and 102 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Exceptions;
use Exception;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
@@ -46,6 +47,10 @@ class Handler extends ExceptionHandler
*/
public function render($request, Exception $exception)
{
// We'll render a 404 for any authorisation exceptions to hide the fact that the resource exists
if ($exception instanceof AuthorizationException)
abort(404,'Not here...');
return parent::render($request, $exception);
}
}