Skip to content
This repository was archived by the owner on Mar 2, 2023. It is now read-only.

Commit a58ecc3

Browse files
committed
master - fixed scopes worng builder sometimes
1 parent cdec871 commit a58ecc3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Models/BaseModel.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use Faker\Factory;
66
use Illuminate\Database\Eloquent\Model;
7-
use Illuminate\Database\Query\Builder;
87
use Illuminate\Support\Arr;
98

109
/**
@@ -185,27 +184,27 @@ public function getAnonymizable()
185184
/**
186185
* where for encrypted columns
187186
*
188-
* @param Builder $query
187+
* @param $query
189188
* @param $field
190189
* @param $value
191190
*
192-
* @return Builder
191+
* @return mixed
193192
*/
194-
public function scopeWhereEncrypted(Builder $query, $field, $value)
193+
public function scopeWhereEncrypted($query, $field, $value)
195194
{
196195
return $query->whereRaw('AES_DECRYPT(' . $field . ', "' . getenv("ENCRYPTION_KEY") . '") LIKE "' . $value . '" COLLATE utf8mb4_general_ci');
197196
}
198197

199198
/**
200199
* orWhere for encrypted columns
201200
*
202-
* @param Builder $query
201+
* @param $query
203202
* @param $field
204203
* @param $value
205204
*
206-
* @return Builder
205+
* @return mixed
207206
*/
208-
public function scopeOrWhereEncrypted(Builder $query, $field, $value)
207+
public function scopeOrWhereEncrypted($query, $field, $value)
209208
{
210209
return $query->orWhereRaw('AES_DECRYPT(' . $field . ', "' . getenv("ENCRYPTION_KEY") . '") LIKE "' . $value . '" COLLATE utf8mb4_general_ci');
211210
}

0 commit comments

Comments
 (0)