mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-22 18:20:31 -05:00
(Update) Refactor Torrent Bookmark System
This commit is contained in:
@@ -12,6 +12,9 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Bookmark;
|
||||
use App\PersonalFreeleech;
|
||||
|
||||
class BookmarkController extends Controller
|
||||
{
|
||||
/**
|
||||
@@ -21,8 +24,14 @@ class BookmarkController extends Controller
|
||||
*/
|
||||
public function bookmarks()
|
||||
{
|
||||
$myBookmarks = auth()->user()->bookmarks;
|
||||
$user = auth()->user();
|
||||
$personal_freeleech = PersonalFreeleech::where('user_id', '=', $user->id)->first();
|
||||
$bookmarks = Bookmark::with('torrent')->where('user_id', '=', auth()->user()->id)->paginate(25);
|
||||
|
||||
return view('bookmark.bookmarks', ['myBookmarks' => $myBookmarks]);
|
||||
return view('bookmark.bookmarks', [
|
||||
'user' => $user,
|
||||
'personal_freeleech' => $personal_freeleech,
|
||||
'bookmarks' => $bookmarks
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user