Skip to content

Commit

Permalink
Only allow verified users for search
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling committed Feb 13, 2023
1 parent b6a8959 commit d2dbcfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Spotlight/UserSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function dependencies(): ?SpotlightCommandDependencies
*/
public function searchUser($query)
{
return User::where('username', 'like', "%$query%")
return User::where('username', 'like', "%$query%")->verified()
->get()
->map(function (User $user) {
// You must map your search result into SpotlightSearchResult objects
Expand Down

0 comments on commit d2dbcfc

Please sign in to comment.