Skip to content

Commit

Permalink
- Added default api_admin guard
Browse files Browse the repository at this point in the history
  • Loading branch information
dash8x committed Mar 17, 2024
1 parent d6d1326 commit ba17503
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Enums/UserStatuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public static function messages(): array
];
}

public static function getMessage($status): string
public function getMessage(): string
{
return self::messages()[$status];
return self::messages()[$this->value];
}

public static function getMessageFromKey(string $key): string
Expand Down
2 changes: 1 addition & 1 deletion src/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public function getStatusMessageAttribute(): string
return __('Please verify your email address to access your account.');
}

return UserStatuses::getMessage($this->status);
return $this->status->getMessage();
}

/**
Expand Down

0 comments on commit ba17503

Please sign in to comment.