]> _ Git - psq.git/commitdiff
filter null and empty
authorLouis Jeckel <louis.jeckel@outlook.com>
Mon, 14 Dec 2020 17:33:40 +0000 (18:33 +0100)
committerLouis Jeckel <louis.jeckel@outlook.com>
Mon, 14 Dec 2020 17:33:40 +0000 (18:33 +0100)
app/User.php

index d714142ac708af13dd51db2468f763bd9b11f7ae..81974e7b93b1cd8814f72814561aa910445d7282 100644 (file)
@@ -516,6 +516,11 @@ class User extends Authenticatable implements MustVerifyEmail, SendsEmails
     public function scopeCompleteProfiles(Builder $builder): void
     {
         $builder->whereNotNull($this->profileFilledAttributes);
+
+        array_map(function($attribute) use($builder) {
+            $builder->where($attribute, '<>', '');
+        }, $this->profileFilledAttributes);
+
     }