mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 22:16:15 +00:00
20 lines
394 B
PHP
20 lines
394 B
PHP
<?php
|
|
|
|
namespace App\Exceptions;
|
|
|
|
use Exception;
|
|
use Illuminate\Http\RedirectResponse;
|
|
use Illuminate\Http\Request;
|
|
|
|
class FailedToDestroyGitHook extends Exception
|
|
{
|
|
public function render(Request $request): ?RedirectResponse
|
|
{
|
|
if ($request->header('X-Inertia')) {
|
|
return back()->with('error', 'Failed to destroy git hook.');
|
|
}
|
|
|
|
return null;
|
|
}
|
|
}
|