I know using:
User::firstOrCreate(array(\'name\' => $input[\'name\'], \'email\' => $input[\'email\'], \'password\' => $input[\'password\']));
An update:
As of Laravel 5.3 doing this in a single step is possible; the firstOrCreate
method now accepts an optional second array as an argument.
The first array argument is the array on which the fields/values are matched, and the second array is the additional fields to use in the creation of the model if no match is found via matching the fields/values in the first array:
See documentation