style: Laravel Pint 코드 포맷팅 적용
- PSR-12 스타일 가이드 준수 - 302개 파일 스타일 이슈 자동 수정 - 코드 로직 변경 없음 (포맷팅만)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
use Illuminate\Auth\AuthenticationException;
|
||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
@@ -11,7 +12,6 @@
|
||||
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Throwable;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
class Handler extends ExceptionHandler
|
||||
{
|
||||
@@ -36,16 +36,18 @@ protected function sendSlackException(Throwable $e): void
|
||||
try {
|
||||
$url = env('LOG_SLACK_WEBHOOK_URL');
|
||||
|
||||
if (!$url) return;
|
||||
if (! $url) {
|
||||
return;
|
||||
}
|
||||
|
||||
$ip = request()?->ip() ?? 'N/A'; // 요청이 없는 경우 대비
|
||||
|
||||
Http::post($url, [
|
||||
'text' => "*[Laravel] 예외 발생!*\n" .
|
||||
"• 메시지: `{$e->getMessage()}`\n" .
|
||||
"• 위치: `{$e->getFile()}:{$e->getLine()}`\n" .
|
||||
"• 시간: " . now()->toDateTimeString() . "\n" .
|
||||
"• IP: `{$ip}`"
|
||||
'text' => "*[Laravel] 예외 발생!*\n".
|
||||
"• 메시지: `{$e->getMessage()}`\n".
|
||||
"• 위치: `{$e->getFile()}:{$e->getLine()}`\n".
|
||||
'• 시간: '.now()->toDateTimeString()."\n".
|
||||
"• IP: `{$ip}`",
|
||||
]);
|
||||
} catch (Throwable $ex) {
|
||||
logger()->error('슬랙 전송 실패', ['message' => $ex->getMessage()]);
|
||||
|
||||
Reference in New Issue
Block a user