Create Controllers Home and Posts
This commit is contained in:
parent
ffea1b6b6c
commit
9a94e5b250
11
App/Controllers/Home.php
Normal file
11
App/Controllers/Home.php
Normal 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
23
App/Controllers/Posts.php
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user