build: initialize RetroHub with Laravel, Inertia, Vue, and Horizon

This commit is contained in:
2026-08-10 13:45:18 +02:00
commit 717db65139
218 changed files with 28356 additions and 0 deletions
@@ -0,0 +1,28 @@
<?php
namespace App\Features\Consoles\Repositories;
use App\Features\Consoles\Models\Console;
use Illuminate\Database\Eloquent\Collection;
class ConsoleRepository
{
public function __construct(
private Console $model
) {}
public function getAll(): Collection
{
return $this->model->withCount('games')->orderBy('name')->get();
}
public function getBySlug(string $slug): ?Console
{
return $this->model->where('slug', $slug)->first();
}
public function getWithGamesCount(): Collection
{
return $this->model->withCount('games')->orderBy('name')->get();
}
}