diff --git a/App/Controllers/Api.php b/App/Controllers/Api.php new file mode 100644 index 0000000..5c9d419 --- /dev/null +++ b/App/Controllers/Api.php @@ -0,0 +1,32 @@ + [ + [ + 'id' => 1, + 'judul' => 'post_1', + 'status' => 1 + ], + [ + 'id' => 2, + 'judul' => 'post_2', + 'status' => 0 + ], + [ + 'id' => 3, + 'judul' => 'post_3', + 'status' => 2 + ] + ] + ]; + + $get['count'] = count($get['data']); + header('Content-Type: application/json'); + echo json_encode($get); + } +} diff --git a/App/Views/Data/mithril.html b/App/Views/Data/mithril.html index 3848421..c7ab863 100644 --- a/App/Views/Data/mithril.html +++ b/App/Views/Data/mithril.html @@ -3,36 +3,41 @@ {% block title %}Mithril{% endblock %} {% block body %} -
-
-
+
{% endblock %}