I know using:
User::firstOrCreate(array(\'name\' => $input[\'name\'], \'email\' => $input[\'email\'], \'password\' => $input[\'password\']));
firstOrCreate() checks for all the arguments to be present before it finds a match.
If you only want to check on a specific field, then use firstOrCreate(['field_name' => 'value']) like
$user = User::firstOrCreate([
'email' => 'abcd@gmail.com'
], [
'firstName' => 'abcd',
'lastName' => 'efgh',
'veristyName'=>'xyz',
]);
Then it check only the email