Skip to content

Commit

Permalink
fix get model from logger
Browse files Browse the repository at this point in the history
  • Loading branch information
sald19 committed Sep 24, 2024
1 parent d816f7f commit 3307a8c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Loggers/Loggers.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ class Loggers
public static function getLoggerByModel(string $model, bool $force = false): ?string
{
foreach (self::$loggers as $logger) {
$alias = Relation::getMorphAlias($logger::$model) ?? $logger::$model;

if ($alias === $model && (! $logger::$disabled || $force)) {
if ($logger::$model === $model && (! $logger::$disabled || $force)) {
return $logger;
}
}
Expand Down

0 comments on commit 3307a8c

Please sign in to comment.