We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd8ec7e commit 38db418Copy full SHA for 38db418
src/Repositories/ExpoDatabaseDriver.php
@@ -47,23 +47,12 @@ public function retrieve(string $key)
47
*/
48
public function forget(string $key, string $value = null): bool
49
{
50
- // Delete interest
51
- $delete = Interest::where('key', $key);
+ $query = Interest::where('key', $key);
52
53
- if (isset($value)) {
54
- // Only delete this token
55
- $delete->where('value', $value);
+ if ($value) {
+ $query->where('value', $value);
56
}
57
58
- $delete->delete();
59
-
60
- // Check if our interest exist
61
- $count = Interest::where('key', $key);
62
63
64
- $count->where('value', $value);
65
- }
66
67
- return $count->count() === 0;
+ return $query->delete() > 0;
68
69
0 commit comments