update: queries

This commit is contained in:
HDVinnie
2020-05-26 13:22:18 -04:00
parent 5bc20e40c7
commit 3d3de56ccb
10 changed files with 39 additions and 39 deletions

View File

@@ -1247,7 +1247,7 @@ class UserController extends Controller
}
if ($request->has('view') && $request->input('view') == 'requests') {
$torrentRequests = TorrentRequest::with(['user', 'category']);
$torrentRequests = TorrentRequest::with(['user', 'category', 'type']);
$order = null;
$sorting = null;
if ($request->has('name') && $request->input('name') != null) {
@@ -1704,7 +1704,7 @@ class UserController extends Controller
if (($request->user()->id == $user->id || $request->user()->group->is_modo)) {
$logger = 'user.private.requests';
$torrentRequests = TorrentRequest::with(['user', 'category'])->where('user_id', '=', $user->id)->latest()->paginate(25);
$torrentRequests = TorrentRequest::with(['user', 'category', 'type'])->where('user_id', '=', $user->id)->latest()->paginate(25);
return view($logger, [
'route' => 'requests',
@@ -1713,7 +1713,7 @@ class UserController extends Controller
]);
}
$logger = 'user.requests';
$torrentRequests = TorrentRequest::with(['user', 'category'])->where('user_id', '=', $user->id)->where('anon', '!=', 1)->latest()->paginate(25);
$torrentRequests = TorrentRequest::with(['user', 'category', 'type'])->where('user_id', '=', $user->id)->where('anon', '!=', 1)->latest()->paginate(25);
return view($logger, [
'route' => 'requests',