From 688565c1ea5b695046c8abe0de879701042b7aaa Mon Sep 17 00:00:00 2001 From: Alexis Gousseau Date: Mon, 18 Aug 2025 15:18:03 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20save=20customer=20email?= =?UTF-8?q?=20attribute=20in=20lower=20case=20#46?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Customer.php | 12 ++++++++++++ composer.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/Models/Customer.php b/app/Models/Customer.php index d377e21..6f1d817 100644 --- a/app/Models/Customer.php +++ b/app/Models/Customer.php @@ -17,6 +17,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Validator; +use Illuminate\Support\Str; use Illuminate\Validation\Rule; use Illuminate\Validation\ValidationException; use LDC\LDCCRM\Enums\ApiError; @@ -101,6 +102,17 @@ class Customer extends Authenticatable implements MustVerifyEmail // * RELATIONSHIPS + /** + * Set email attribute in lower case. + * + * @param string $value + * @return void + */ + public function setEmailAttribute(string $value): void + { + $this->attributes['email'] = Str::lower($value); + } + /** * Has Many Participation relation * diff --git a/composer.json b/composer.json index 2efa331..6d4d24d 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "uwil/gen-game-web", - "version": "3.1.0", + "version": "3.1.1", "type": "project", "description": "Game generator", "support": {