Unable to Display my method id from the controller .
i tried to access my method id and i get an error . Am i going somewhere wrong ?
<?php defined('SYSPATH') or die('No Direct Script Access');
Class Controller_Line extends Controller
{
public function action_index()
{
echo "<h1> Demonstration : KOHANA </h1>";
echo "This is a Line 1.<br>";
echo "This is a Line 2.<br>";
echo "This is a Line 3.<br>";
echo "This is a Line 4.<br>";
}
public function id()
{
echo "this is method id";
}
}
?>
Controller actions needs to be prefixed with action_
for the router to be able to call it. So the method needs to be named action_id()
.