se modifica modelo para agregar tokens unsubscribed
This commit is contained in:
@@ -33,6 +33,7 @@ class User extends Authenticatable
|
|||||||
'password',
|
'password',
|
||||||
'code',
|
'code',
|
||||||
'status',
|
'status',
|
||||||
|
'unsubscribe_token'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
@@ -100,4 +101,11 @@ class User extends Authenticatable
|
|||||||
return $this->belongsToMany(Prospecto::class);
|
return $this->belongsToMany(Prospecto::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected static function booted()
|
||||||
|
{
|
||||||
|
static::creating(function ($user) {
|
||||||
|
$user->unsubscribe_token ??= \Illuminate\Support\Str::uuid();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user