Skip to content

Commit

Permalink
refactor saving tvs
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathologic committed Jul 17, 2024
1 parent 7a690a8 commit 40668b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Services/Users/UserSaveValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ function () use ($role) {
}

foreach ($tvs['save'] as $value) {
\EvolutionCMS\Models\UserValue::updateOrCreate([
UserValue::updateOrCreate([
'userid' => $id, 'tmplvarid' => $value['id']
], ['value' => $value['value']]);
}
if($tvs['delete']) {
\EvolutionCMS\Models\UserValue::query()
UserValue::query()
->whereIn('tmplvarid', $tvs['delete'])
->where('userid', $id)
->delete();
Expand Down

0 comments on commit 40668b3

Please sign in to comment.