Trying to learn PHP MVC. So far so good until this moment. I have function like this in my ./controllers/index.php
<?php
class Index extends Controller {
function __construct() {
parent::__construct();
}
function showFeeds() {
return 'done';
}
}
?>
I know how to call model class and run showFeed() on model class. my problem is how to print 'done' on my ./views/index.php. what are the options for that.
I already tried some of them listed below. but no luck.
- parent::showFeeds()
- $this->controller->showFeeds();