mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-29 01:14:04 +00:00
Laravel Vapor - New schedule tasks and commands for token expiration for new user and password reset
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class UserEmailVerification extends AbstractModel
|
||||
@@ -25,4 +26,13 @@ class UserEmailVerification extends AbstractModel
|
||||
public function user(): BelongsTo {
|
||||
return $this->belongsTo(User::class, 'email', 'email');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $query
|
||||
* @return mixed
|
||||
*/
|
||||
public function scopeTwoDaysOld($query)
|
||||
{
|
||||
return $query->where('created_at', '<=', Carbon::now()->subHours(48));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user