latest update
This commit is contained in:
1 parent
64eadfaf56
commit
2a562b99f1
25 files changed
+2617
-2337
No files matched your search
@@ -33,6 +33,8 @@ class CommentController extends Controller
|
||||
'body' => $request->body,
|
||||
'parent_id' => $request->parent_id,
|
||||
]);
|
||||
// $video->increment('comment_count'); // Disabled - was causing SQL error
|
||||
$comment->load('user:id,name,avatar_url');
|
||||
|
||||
// Handle mentions
|
||||
preg_match_all('/@(\w+)/', $request->body, $matches);
|
||||
@@ -41,9 +43,10 @@ class CommentController extends Controller
|
||||
// For now, we just parse them
|
||||
}
|
||||
|
||||
$video->increment('comment_count');
|
||||
|
||||
return response()->json(['success' => true, 'comment' => $comment->load('user')]);
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'comment' => $comment->load('user:id,name,avatar_url'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function update(Request $request, Comment $comment)
|
||||
@@ -60,7 +63,9 @@ class CommentController extends Controller
|
||||
'body' => $request->body,
|
||||
]);
|
||||
|
||||
return response()->json($comment->load('user'));
|
||||
$comment->load('user:id,name,avatar_url');
|
||||
|
||||
return response()->json($comment->load('user:id,name,avatar_url'));
|
||||
}
|
||||
|
||||
public function destroy(Comment $comment)
|
||||
|
||||
Reference in new issue
Block a user