Files
gamelog/app/Policies/GameCommentPolicy.php
MarkandClaude Sonnet 4.6 14047dfe37 Add friend library comparison and game comments features
- CompareController: side-by-side library diff with stats (common games, rating diff)
- GameCommentController + GameCommentPolicy: threaded comments with replies, auth-gated
- GameComment model with top-level scope and self-referential replies relation
- Migration: game_comments table with parent_id for threading
- games/show: Discussion section with Alpine.js (post, reply, delete)
- compare/show: tabbed view (in common, they have, you have) with game cards
- users/show: "Compare Libraries" button visible to other authenticated users

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-30 12:04:24 +03:00

15 lines
237 B
PHP

<?php
namespace App\Policies;
use App\Models\GameComment;
use App\Models\User;
class GameCommentPolicy
{
public function delete(User $user, GameComment $comment): bool
{
return $user->id === $comment->user_id;
}
}