| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 51 | public function indexActionGet() : object |
||
| 52 | { |
||
| 53 | $page = $this->di->get("page"); |
||
| 54 | |||
| 55 | $sql = "SELECT * FROM posts order by created desc;"; |
||
| 56 | $posts = $this->db->executeFetchAll($sql); |
||
| 57 | |||
| 58 | $sql = "SELECT * FROM tags ORDER BY tagname asc limit 5;"; |
||
| 59 | $tags = $this->db->executeFetchAll($sql); |
||
| 60 | //var_dump($tags); |
||
| 61 | $sql = "SELECT * FROM users;"; |
||
| 62 | $users = $this->db->executeFetchAll($sql); |
||
| 63 | |||
| 64 | $page->add("home/index", [ |
||
| 65 | "tags" => $tags, |
||
| 66 | "posts" => $posts, |
||
| 67 | "users" => $users, |
||
| 68 | ]); |
||
| 69 | |||
| 70 | return $page->render([ |
||
| 71 | "title" => "The home page ", |
||
| 72 | ]); |
||
| 75 |