From: Louis Jeckel Date: Mon, 14 Dec 2020 17:33:40 +0000 (+0100) Subject: filter null and empty X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ebd1ee57ca3b1fd4eb5bd856ac7a3db2984ae365;p=psq.git filter null and empty --- diff --git a/app/User.php b/app/User.php index d714142..81974e7 100644 --- a/app/User.php +++ b/app/User.php @@ -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); + }