Initial GameLog setup

- Laravel 11 + Breeze (dark mode) + Tailwind + Alpine.js
- Migrations: games, genres, platforms, companies, pivots,
  user_games, user_lists, reviews, follows, activities
- Models: Game, Genre, Platform, Company, UserGame, UserList,
  Review, ReviewVote, Activity, User (with gamelog fields)
- IgdbService: OAuth2 token management, search, game fetch,
  popular/new releases, genre filter, cover/screenshot URL helpers
- IGDB credentials in config/services.php (from .env)
This commit is contained in:
Mark
2026-05-29 00:33:00 +03:00
commit 531e9d445a
136 changed files with 16037 additions and 0 deletions
@@ -0,0 +1,21 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void {
Schema::create('reviews', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->foreignId('game_id')->constrained()->cascadeOnDelete();
$table->unsignedTinyInteger('rating')->nullable(); // 1-10
$table->text('body');
$table->boolean('has_spoilers')->default(false);
$table->unsignedInteger('helpful_count')->default(0);
$table->timestamps();
$table->unique(['user_id', 'game_id']);
$table->index(['game_id', 'helpful_count']);
});
}
public function down(): void { Schema::dropIfExists('reviews'); }
};