add event types and ip detection
This commit is contained in:
@@ -54,7 +54,7 @@ class EventType
|
||||
return [
|
||||
'Illuminate\\Auth\\Events\\Attempting' => self::ATTEMPTING,
|
||||
'Illuminate\\Auth\\Events\\Failed' => self::FAILED,
|
||||
'Illuminate\Auth\Events\Lockout' => self::LOCKOUT,
|
||||
'Illuminate\\Auth\\Events\\Lockout' => self::LOCKOUT,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -87,4 +87,22 @@ class EventType
|
||||
|
||||
return self::laravelDefaultEvents()[$event] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Log type
|
||||
*/
|
||||
public static function logType(string $name): string
|
||||
{
|
||||
return match ($name) {
|
||||
self::REGISTER => 'notice',
|
||||
self::LOGIN => 'notice',
|
||||
self::PHONE_VERIFICATION => 'info',
|
||||
self::LOGOUT => 'notice',
|
||||
self::PASSWORD_RESET => 'info',
|
||||
self::FAILED => 'warning',
|
||||
self::ATTEMPTING => 'info',
|
||||
self::LOCKOUT => 'alert',
|
||||
default => 'info',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user