create notification when register

This commit is contained in:
2025-12-15 16:45:51 +01:00
parent dfb70cc5ce
commit eab9565c7d
7 changed files with 1191 additions and 533 deletions
+1 -1
View File
@@ -12,6 +12,6 @@ class Notification extends Model
public function users(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
{
return $this->belongsToMany(User::class, 'user_notification', 'notification_id', 'user_id');
return $this->belongsToMany(User::class, 'notification_user', 'notification_id', 'user_id');
}
}
+1 -1
View File
@@ -57,6 +57,6 @@ class User extends Authenticatable
public function notifications(): \Illuminate\Database\Eloquent\Relations\BelongsToMany
{
return $this->belongsToMany(Notification::class, 'user_notification', 'user_id', 'notification_id');
return $this->belongsToMany(Notification::class, 'notification_user', 'user_id', 'notification_id');
}
}