my problem is the following I do not manage to capture the id to perform the update function I get the following error: undefined index: id this is the code:
public function getUpdate() {
$id = $_GET['id'];
$blogPosts = BlogPost::find($id);
$titleValue = $blogPosts['title'];
$contentValue = $blogPosts['content'];
return $this->render('admin/update-post.twig', [
'titleValue' => $titleValue,
'contentValue' => $contentValue,
'id' => $id
]);
}