We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sometimes I see this pop up while typing.
I'm not sure how it happens. but what do you think of updateOrCreate Method
updateOrCreate
<?php $allTags = WinkTag::all(); return collect($incomingTags)->map(function ($incomingTag) use ($allTags) { $tag = $allTags->where('id', $incomingTag['id'])->first(); if (! $tag) { $tag = WinkTag::create([ 'id' => $id = Str::uuid(), 'name' => $incomingTag['name'], 'slug' => Str::slug($incomingTag['name']), ]); } return (string) $tag->id; })->toArray();
The text was updated successfully, but these errors were encountered:
fix issue themsaid#256
cfd120f
No branches or pull requests
Sometimes I see this pop up while typing.
I'm not sure how it happens. but what do you think of
updateOrCreate
MethodThe text was updated successfully, but these errors were encountered: