Skip to content

T5 #448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 15 commits into from
Prev Previous commit
Next Next commit
Update User.php
  • Loading branch information
DonaldFon authored May 19, 2025
commit fdf5fc021bc9bcae4494770cca9b763a64461d7b
5 changes: 5 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Illuminate\Database\Eloquent\Builder;

class User extends Authenticatable
{
Expand Down Expand Up @@ -41,4 +42,8 @@ class User extends Authenticatable
protected $casts = [
'email_verified_at' => 'datetime',
];

public function scopeActive(Builder $query){
$query->whereNotNull('email_verified_at');
}
}
Loading