<?php

namespace App\Http\Controllers\Dashboard;

use App\Http\Controllers\Controller;
use App\Http\Filters\FilterModels\ComplaintsFilter;
use App\Models\ContactUs;
use Illuminate\Http\Request;

class ComplaintsController extends Controller
{
    public function index() {
        $complaints =   ContactUs::query()
            ->filter(new ComplaintsFilter(\request()))
            ->latest()
            ->paginate();
        return view('dashboard.complaints_management.complaints.index', ['complaints' => $complaints]);
    }
}
