From: Louis Jeckel Date: Wed, 14 Apr 2021 09:48:04 +0000 (+0200) Subject: email verification X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a5fe0d9d2f2b5c9cdc80b16b1a3293792e35f61e;p=psq.git email verification --- diff --git a/.idea/lettre-pharma.iml b/.idea/lettre-pharma.iml index 6df4b51..008fdad 100644 --- a/.idea/lettre-pharma.iml +++ b/.idea/lettre-pharma.iml @@ -86,6 +86,8 @@ + + diff --git a/.idea/php.xml b/.idea/php.xml index 1334ed5..35238ab 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -219,6 +219,8 @@ + + diff --git a/app/Nova/User.php b/app/Nova/User.php index f455fb9..89d673d 100644 --- a/app/Nova/User.php +++ b/app/Nova/User.php @@ -85,7 +85,10 @@ class User extends Resource // ID::make()->sortable(), Text::make('Prénom', 'first_name'), Text::make('Nom', 'last_name'), - Text::make('Email')->required(), + Text::make('Email') + ->rules('required', 'email', 'max:255') + ->creationRules('unique:users,email') + ->updateRules('unique:users,email,{{resourceId}}'), Text::make('Position'), Text::make('Téléphone', 'phone'),