diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index aa434e8d..a55a48c1 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -67,7 +67,10 @@ class AdminController extends Controller public function reports(Request $request) { $filter = $request->input('filter') == 'closed' ? 'closed' : 'open'; - $reports = Report::orderBy('created_at','desc') + $reports = Report::whereHas('status') + ->whereHas('reportedUser') + ->whereHas('reporter') + ->orderBy('created_at','desc') ->when($filter, function($q, $filter) { return $filter == 'open' ? $q->whereNull('admin_seen') : diff --git a/resources/views/admin/reports/home.blade.php b/resources/views/admin/reports/home.blade.php index e3c20319..254772ce 100644 --- a/resources/views/admin/reports/home.blade.php +++ b/resources/views/admin/reports/home.blade.php @@ -18,15 +18,17 @@ @php($ai = App\AccountInterstitial::whereNotNull('appeal_requested_at')->whereNull('appeal_handled_at')->count()) @php($spam = App\AccountInterstitial::whereType('post.autospam')->whereNull('appeal_handled_at')->count()) @if($ai || $spam) -
- -

{{$ai}}

- Appeal {{$ai == 1 ? 'Request' : 'Requests'}} -
- -

{{$spam}}

- Flagged {{$ai == 1 ? 'Post' : 'Posts'}} -
+
+
@endif @if($reports->count())