Skip to content

Commit 61da177

Browse files
committed
Update Model.php
Change so postgreSQL (and others) will be case insensitive
1 parent 37a4a15 commit 61da177

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • app/sprinkles/core/src/Database/Models

app/sprinkles/core/src/Database/Models/Model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function attributeExists($key)
6868
*/
6969
public static function findUnique($value, $identifier, $checkDeleted = true)
7070
{
71-
$query = static::where($identifier, $value);
71+
$query = static::whereRaw("LOWER($identifier) = ?", [mb_strtolower($value)]);
7272

7373
if ($checkDeleted) {
7474
$query = $query->withTrashed();

0 commit comments

Comments
 (0)