diff --git a/app/Models/User.php b/app/Models/User.php index e23e0905..c435e563 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -41,4 +41,9 @@ class User extends Authenticatable protected $casts = [ 'email_verified_at' => 'datetime', ]; + + public function scopeActive($query) + { + return $query->whereNotNull('email_verified_at'); + } }