Closed Binternet closed 1 year ago
My bad, the correct way is to pass two arrays, first one is for the lookup attributes and the second one is for the values:
$cf = \App\Models\MyModel::updateOrCreate([
'uuid' => 13,
], [
'domain_name' => 'mytest.com'
]);
I am trying to update the property for a given model, yet it keeps creating a new entry instead of updating the existing one even though I've set the
$primaryKey
attribute on the class touuid
: