Fixing PDO fetching
This commit is contained in:
@@ -45,18 +45,18 @@ class Posts
|
||||
if (is_array($id)) {
|
||||
$id = implode('', $id);
|
||||
}
|
||||
$posts = $this->post->showSingle($id);
|
||||
$post = $this->post->showSingle($id);
|
||||
$categories = $this->post->showCategories();
|
||||
$users = $this->access->showSingle($id);
|
||||
$user = $this->access->showSingle($id);
|
||||
$date = new \DateTime();
|
||||
$timestamp = $date->format("Y/m/d H:i:s");
|
||||
// echo "You can edit exists data with id $id here"; // Nanti di replace sama twig view ke App\Views\Data\edit_pengumuman.html
|
||||
View::render(
|
||||
'Data/edit_pengumuman.html',
|
||||
[
|
||||
'posts' => $posts,
|
||||
'post' => $post,
|
||||
'categories' => $categories,
|
||||
'users' => $users,
|
||||
'user' => $user,
|
||||
'timestamp' => $timestamp,
|
||||
'token' => Token::generate()
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user