]> _ Git - psq.git/commitdiff
add email to searchable array
authorLouis Jeckel <louis.jeckel@outlook.cm>
Mon, 31 Aug 2020 10:49:49 +0000 (12:49 +0200)
committerLouis Jeckel <louis.jeckel@outlook.cm>
Mon, 31 Aug 2020 10:49:49 +0000 (12:49 +0200)
app/Nova/Prospect.php
app/Nova/SpecialUsers.php
app/Nova/Subscriber.php
app/User.php

index a8660864395623090e45e834d3aee2328ce0af06..8f782cc2bdff0e53b75c6275889f563de6d47be2 100644 (file)
@@ -16,6 +16,11 @@ class Prospect extends User
         return "Prospects";
     }
 
+    public static function singularLabel()
+    {
+        return "Prospect";
+    }
+
     public static function indexQuery(NovaRequest $request, $query)
     {
         return $query->where('type', 1);
index dce98d643e65dca258a97d32ed1f5057924fc42f..b0fa75f8052cb54e9556fb9c3166a89e99214930 100644 (file)
@@ -16,6 +16,11 @@ class SpecialUsers extends User
         return "Autres utilisateurs";
     }
 
+    public static function singularLabel()
+    {
+        return "Utilisateur (autre)";
+    }
+
     public static function indexQuery(NovaRequest $request, $query)
     {
         return $query->where('type', 2);
index 4e9d488f329554fd9ce54d35e4203c21d2d206a6..db301a8af769ec106159f72881e28d0611611f97 100644 (file)
@@ -16,6 +16,12 @@ class Subscriber extends User
         return "AbonnĂ©s";
     }
 
+    public static function singularLabel()
+    {
+        return "AbonnĂ©";
+    }
+
+
     public static function indexQuery(NovaRequest $request, $query)
     {
         return $query->where('type', 0);
index e4ec28ff18502481a73d63405aadc2a95ec544ae..7faf3699e90b11bcb482c7f0e7fc9f13d4ce8f5c 100644 (file)
@@ -22,6 +22,7 @@ use Laravel\Scout\Searchable;
  * @package App
  * @property $first_name
  * @property $last_name
+ * @property $email
  * @property $id
  * @property-read $name
  * @property Organization $organization
@@ -135,6 +136,7 @@ class User extends Authenticatable implements MustVerifyEmail
             'last_name' => $this->last_name,
             'position' => $this->position,
             'organization' => $this->organization->name ?? null,
+            'email' => $this->email,
         ];
     }