Laravel FirstorCreate с несколькими параметрами
The firstOrCreate method takes two arrays, the first of which is all of the attributes to find an existing record, the second being any additional attributes that a newly created record should get (combined with the values in the first array). So you can specify multiple key/value pairs in both arrays
Witty Wren