From b8b308a89f19b895d8b9211dda358bd6efca1bb2 Mon Sep 17 00:00:00 2001 From: Linksehat Staging Server Date: Thu, 9 Nov 2023 15:36:33 +0700 Subject: [PATCH] update user model linksehat --- app/Models/OLDLMS/User.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Models/OLDLMS/User.php b/app/Models/OLDLMS/User.php index 1bcb3e15..47a49474 100644 --- a/app/Models/OLDLMS/User.php +++ b/app/Models/OLDLMS/User.php @@ -13,9 +13,9 @@ use Spatie\Permission\Traits\HasRoles; use Illuminate\Notifications\Notifiable; -class User extends Model +class User extends Authenticatable { - use HasFactory, SoftDeletes, HasApiTokens, HasRoles, Notifiable; + use HasFactory, SoftDeletes, HasApiTokens, HasRoles, Notifiable, Notifiable; const CREATED_AT = 'dCreateOn'; const UPDATED_AT = 'dUpdateOn'; @@ -66,4 +66,9 @@ class User extends Model { return $this->hasMany(UserInsurance::class, 'nIDUser', 'nID'); } + + public function notificationTokens() + { + return $this->morphMany(NotificationToken::class, 'notifiabletoken'); + } }