Skip to content

Commit

Permalink
Update Model.php
Browse files Browse the repository at this point in the history
Change so postgreSQL (and others) will be case insensitive
  • Loading branch information
amosfolz committed Jul 6, 2019
1 parent 37a4a15 commit 61da177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/sprinkles/core/src/Database/Models/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function attributeExists($key)
*/
public static function findUnique($value, $identifier, $checkDeleted = true)
{
$query = static::where($identifier, $value);
$query = static::whereRaw("LOWER($identifier) = ?", [mb_strtolower($value)]);

if ($checkDeleted) {
$query = $query->withTrashed();
Expand Down

0 comments on commit 61da177

Please sign in to comment.