mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-07 11:40:56 -05:00
fix: TorrentController
This commit is contained in:
@@ -81,9 +81,11 @@ class TorrentController extends Controller
|
||||
*/
|
||||
public function show(Request $request, int|string $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$user = $request->user();
|
||||
|
||||
$torrent = Torrent::withAnyStatus()
|
||||
->with(['user', 'comments', 'category', 'type', 'resolution', 'subtitles', 'playlists'])
|
||||
->withExists(['bookmarks' => fn ($query) => $query->where('user_id', '=', $request->user()->id)])
|
||||
->withExists(['bookmarks' => fn ($query) => $query->where('user_id', '=', $user->id)])
|
||||
->findOrFail($id);
|
||||
|
||||
$meta = null;
|
||||
|
||||
Reference in New Issue
Block a user