Skip to content

Commit

Permalink
reuse method logic
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed May 29, 2024
1 parent c09b2d3 commit decfcc8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Drivers/DatabaseDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,11 @@ protected function update($feature, $scope, $value)
*/
protected function insert($feature, $scope, $value)
{
return $this->newQuery()->insert([
return $this->insertMany([[
'name' => $feature,
'scope' => Feature::serializeScope($scope),
'value' => json_encode($value, flags: JSON_THROW_ON_ERROR),
static::CREATED_AT => $now = Carbon::now(),
static::UPDATED_AT => $now,
]);
'scope' => $scope,
'value' => $value,
]]);
}

/**
Expand Down

0 comments on commit decfcc8

Please sign in to comment.