Add Livewire comment system

This commit is contained in:
2026-01-10 15:02:14 +01:00
parent 67f5d0db8b
commit 5f575024e2
13 changed files with 456 additions and 33 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Policies;
use App\Models\User;
use App\Models\Comment;
use Illuminate\Auth\Access\HandlesAuthorization;
class CommentPolicy
{
use HandlesAuthorization;
public function update(User $user, Comment $comment): bool
{
return $user->id === $comment->user_id;
}
public function destroy(User $user, Comment $comment): bool
{
return $user->id === $comment->user_id;
}
}