Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
itssamtaylor committed Oct 31, 2019
1 parent f70e649 commit f92ada6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FindSimilarUsernames.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ trait FindSimilarUsernames
*/
public function findSimilarUsernames($username)
{
if (count(static::where(config('username_generator.column', 'username'), $username)->get()) === 0) {
return 0;
if (count($data = static::where(config('username_generator.column', 'username'), $username)->get()) === 0) {
return $data;
}

return static::where(config('username_generator.column', 'username'), 'LIKE', $username.'%')->get();
Expand Down

0 comments on commit f92ada6

Please sign in to comment.