mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
book case stats added
This commit is contained in:
18
app/Http/Livewire/BookCase/Stats.php
Normal file
18
app/Http/Livewire/BookCase/Stats.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\BookCase;
|
||||
|
||||
use App\Models\OrangePill;
|
||||
use App\Models\User;
|
||||
use Livewire\Component;
|
||||
|
||||
class Stats extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.book-case.stats', [
|
||||
'orangePills' => OrangePill::query()->count(),
|
||||
'plebs' => User::query()->whereHas('orangePills')->count(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user