mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
gamify reputation added
This commit is contained in:
@@ -10,6 +10,8 @@ use RalphJSmit\Laravel\SEO\Support\SEOData;
|
||||
class HighscoreTable extends Component
|
||||
{
|
||||
public Country $country;
|
||||
public bool $viewingModal = false;
|
||||
public ?User $modal = null;
|
||||
|
||||
public function render()
|
||||
{
|
||||
@@ -28,4 +30,17 @@ class HighscoreTable extends Component
|
||||
)
|
||||
]);
|
||||
}
|
||||
|
||||
public function openModal($id)
|
||||
{
|
||||
$this->modal = User::query()
|
||||
->with([
|
||||
'orangePills',
|
||||
'reputations',
|
||||
])
|
||||
->where('id', $id)
|
||||
->first();
|
||||
|
||||
$this->viewingModal = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,4 +60,9 @@ class User extends Authenticatable implements MustVerifyEmail, CanComment
|
||||
{
|
||||
return $this->hasMany(OrangePill::class);
|
||||
}
|
||||
|
||||
public function reputations()
|
||||
{
|
||||
return $this->morphMany('QCod\Gamify\Reputation', 'subject');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user