Update comment url structure

This commit is contained in:
Daniel Supernault 2018-06-04 00:07:40 -06:00
parent aaf94d56cc
commit 2a73150586
4 changed files with 10 additions and 4 deletions

View file

@ -10,10 +10,10 @@ use App\{Comment, Profile, Status};
class CommentController extends Controller
{
public function show(Request $request, $username, int $id)
public function show(Request $request, $username, int $id, int $cid)
{
$user = Profile::whereUsername($username)->firstOrFail();
$status = Status::whereProfileId($user->id)->whereNotNull('in_reply_to_id')->findOrFail($id);
$status = Status::whereProfileId($user->id)->whereInReplyToId($id)->findOrFail($cid);
return view('status.reply', compact('user', 'status'));
}