null-safe

This commit is contained in:
Denis Duliçi 2022-10-19 15:40:46 +03:00
parent c7d02e8fcc
commit 4b3774747a
2 changed files with 2 additions and 2 deletions

View File

@ -24,6 +24,6 @@ class Bugsnag
public static function getRouteName(): ?string public static function getRouteName(): ?string
{ {
return request()->route()->getName(); return request()->route()?->getName();
} }
} }

View File

@ -71,6 +71,6 @@ class Sentry
public static function getRouteName(): ?string public static function getRouteName(): ?string
{ {
return request()->route()->getName(); return request()->route()?->getName();
} }
} }