1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 08:14:10 +00:00

Update CommentController, add showAll() method

This commit is contained in:
Daniel Supernault 2018-08-09 20:04:48 -06:00
parent a22a5c2922
commit d9ec94ba65
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -18,6 +18,14 @@ class CommentController extends Controller
return view('status.reply', compact('user', 'status'));
}
public function showAll(Request $request, $username, int $id)
{
$user = Profile::whereUsername($username)->firstOrFail();
$status = Status::whereProfileId($user->id)->findOrFail($id);
$replies = Status::whereInReplyToId($id)->paginate(40);
return view('status.comments', compact('user', 'status', 'replies'));
}
public function store(Request $request)
{
if(Auth::check() === false) { abort(403); }