admin panel added and comments are working and likes are working

This commit is contained in:
ghassan committed 2026-03-03 17:36:19 +03:00
1 parent 72e9439727
commit a28023c29b
32 files changed
+5077 -2999

No files matched your search

+11 -1
View File
@@ -198,7 +198,17 @@ class VideoController extends Controller
}
}
return view('videos.show', compact('video'));
// Load comments with user relationship
$video->load(['comments.user', 'comments.replies.user']);
// Render the appropriate view based on video type
$view = match($video->type) {
'match' => 'videos.types.match',
'music' => 'videos.types.music',
default => 'videos.types.generic',
};
return view($view, compact('video'));
}
public function edit(Video $video, Request $request)