Skip to content

Commit

Permalink
fixing table for pivot
Browse files Browse the repository at this point in the history
  • Loading branch information
brianclogan committed May 4, 2024
1 parent 4d1e050 commit 2d3718d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Models/Pivots/AchievementUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@

class AchievementUser extends Pivot
{

public function __construct(array $attributes = [])
{
parent::__construct($attributes);
$this->table = config('level-up.tables.achievements') . '_' . config('level-up.user.users_table');
}

public function scopeWithProgress(Builder $query, int $progress): Collection
{
return $query->where(column: 'progress', operator: $progress)->get();
Expand Down

0 comments on commit 2d3718d

Please sign in to comment.