From 12a4386c017b32fbe2f02a32093c77348ecc7b2a Mon Sep 17 00:00:00 2001 From: Imtyaz Ahmed <54882826+imtyaz-17@users.noreply.github.com> Date: Thu, 4 Jul 2024 11:09:08 +0600 Subject: [PATCH] T10 Update User.php --- app/Models/User.php | 5 +++++ 1 file changed, 5 insertions(+) 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'); + } }