Skip to content

Commit

Permalink
fix: Folder check bypass
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmellor committed Jul 22, 2023
1 parent af25a80 commit 454781c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Concerns/GiveExperience.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function addPoints(
/**
* If the Multiplier Service is enabled, apply the Multipliers.
*/
if (config(key: 'level-up.multiplier.enabled')) {
if (config(key: 'level-up.multiplier.enabled') && file_exists(filename: config(key: 'level-up.multiplier.path'))) {
$amount = $this->getMultipliers(amount: $amount);
}

Expand Down Expand Up @@ -176,13 +176,13 @@ public function levelUp(): void
event(new UserLevelledUp(user: $this, level: $this->getLevel()));
}

public function level(): BelongsTo
public function experienceHistory(): HasMany
{
return $this->belongsTo(related: Level::class);
return $this->hasMany(related: ExperienceAudit::class);
}

public function experienceHistory(): HasMany
public function level(): BelongsTo
{
return $this->hasMany(related: ExperienceAudit::class);
return $this->belongsTo(related: Level::class);
}
}

0 comments on commit 454781c

Please sign in to comment.