Created
September 13, 2018 15:05
-
-
Save minedun6/9c73993535aa99480a64db39a6c0b9f3 to your computer and use it in GitHub Desktop.
Flash out the invalid usernames
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$allUserNames = explode(',', $userNames); | |
$validUserNames = Contact::whereIn('user_name', $allUserNames) | |
->pluck('user_name') | |
->toArray(); | |
$invalidUserNames = array_values(array_diff($allUserNames, $validUserNames)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment