Create Controllers Home and Posts

This commit is contained in:
Gregorio Chiko Putra 2017-08-31 09:57:27 +07:00
parent ffea1b6b6c
commit 9a94e5b250
2 changed files with 34 additions and 0 deletions

11
App/Controllers/Home.php Normal file
View File

@ -0,0 +1,11 @@
<?php
namespace App\Controllers;
class Home
{
public function index()
{
echo "This is index of home"; // Nanti di replace sama twig view ke App\Views\Data\pengumuman.html
return true;
}
}

23
App/Controllers/Posts.php Normal file
View File

@ -0,0 +1,23 @@
<?php
namespace App\Controllers;
class Posts
{
public function index()
{
echo "This is index of posts."; // Nanti di replace sama twig view ke App\Views\Data\pengumuman.html
return true;
}
public function new()
{
echo "You can entry new data here."; // Nanti di replace sama twig view ke App\Views\Data\new_pengumuman.html
return true;
}
public function edit($id)
{
echo "You can edit exists data with id $id here"; // Nanti di replace sama twig view ke App\Views\Data\edit_pengumuman.html
return true;
}
}