From 4658c113676866ff393816ea6855e6dd59326f28 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Feb 2026 16:26:51 -0600 Subject: [PATCH] se modifica modelo para agregar tokens unsubscribed --- app/Models/User.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Models/User.php b/app/Models/User.php index ed117a73..9e0ac57f 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -33,6 +33,7 @@ class User extends Authenticatable 'password', 'code', 'status', + 'unsubscribe_token' ]; @@ -100,4 +101,11 @@ class User extends Authenticatable return $this->belongsToMany(Prospecto::class); } + protected static function booted() + { + static::creating(function ($user) { + $user->unsubscribe_token ??= \Illuminate\Support\Str::uuid(); + }); + } + }