Update comment url structure
This commit is contained in:
parent
aaf94d56cc
commit
2a73150586
4 changed files with 10 additions and 4 deletions
|
@ -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'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue