Skip to content

Commit

Permalink
Added email scope to user
Browse files Browse the repository at this point in the history
  • Loading branch information
ttimot24 committed Oct 9, 2024
1 parent c6f720e commit 3bdf260
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Model/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,8 @@ public function setPasswordAttribute($value){
$this->attributes['password'] = \Hash::make($value);
}

public function scopeEmail($query, $email){
return $query->where('email', $email);
}

}

0 comments on commit 3bdf260

Please sign in to comment.