<?php

namespace App\Http\Controllers\Panel;

use App\Http\Controllers\Controller;
use App\Models\ProductReview;
use Illuminate\Support\Facades\Auth;

class ReviewController extends Controller
{
    public function index()
    {
        $reviews = ProductReview::with('product')
            ->where('user_id', Auth::id())
            ->latest()
            ->paginate(10);

        return view('panel.comments.index', compact('reviews'));
    }
}
