Skip to content

Commit

Permalink
Merge pull request #15 from dannydinges/2.x
Browse files Browse the repository at this point in the history
Add RedirectResponse type for render() on BanhammerException.
  • Loading branch information
mchev authored Aug 23, 2024
2 parents 502036c + b376d3e commit 6193903
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Exceptions/BanhammerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Mchev\Banhammer\Exceptions;

use Exception;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Log;
Expand All @@ -26,7 +27,7 @@ public function report(): void
/**
* Render the exception into an HTTP response.
*/
public function render(Request $request): Response
public function render(Request $request): Response|RedirectResponse
{
return (config('ban.fallback_url'))
? redirect(config('ban.fallback_url'))
Expand Down

0 comments on commit 6193903

Please sign in to comment.